linux下一个用户如何分配给多个用户组?求命令,谢了。

比如下中的xSwap:video:x:33:xSwapwheel:x:10:xSwapxgate:!:1000:xSwapmysql:!:108:xSwap... 比如下中的xSwap:

video:x:33:xSwap
wheel:x:10:xSwap
xgate:!:1000:xSwap
mysql:!:108:xSwap
展开
 我来答
JJ_Victor
2013-02-22 · TA获得超过430个赞
知道小有建树答主
回答量:214
采纳率:0%
帮助的人:160万
展开全部
你可以使用usermod -G group1 group2 group3 group4
参见man usermod
-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
A list of supplementary groups which the user is also a member of. Each group is
separated from the next by a comma, with no intervening whitespace. The groups are
subject to the same restrictions as the group given with the -g option.
If the user is currently a member of a group which is not listed, the user will be
removed from the group. This behaviour can be changed via the -a option, which
appends the user to the current supplementary group list.
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式