LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1017|回复: 7

哪条命令能把我自己加到cdrom组里?

[复制链接]
发表于 2007-1-9 00:09:40 | 显示全部楼层 |阅读模式
是不是usermod? 怎么用?
发表于 2007-1-9 09:28:32 | 显示全部楼层
usermode -G cdrom username
好像是这个。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-9 10:13:52 | 显示全部楼层
usermod -G cdrom username 后重新登录就只剩cdrom一个group了
回复 支持 反对

使用道具 举报

发表于 2007-1-9 11:18:19 | 显示全部楼层
gpa** -a username group

具体命令忘了,按tab补全吧。
回复 支持 反对

使用道具 举报

发表于 2007-1-9 14:27:33 | 显示全部楼层
-G group,[...]
              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

需要指出来所有组
usermod -G cdrom,user.... username

或者去修改/etc/group文件好了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-9 14:31:32 | 显示全部楼层
Post by wd_afei
-G group,[...]
或者去修改/etc/group文件好了。


这么改不会有问题吧?
回复 支持 反对

使用道具 举报

发表于 2007-1-9 15:24:25 | 显示全部楼层
不会,我经常改。就是改了之后需要重新登录?
回复 支持 反对

使用道具 举报

发表于 2007-1-9 15:40:14 | 显示全部楼层
#gpasswd -a leemars floppy
Adding user leemars to group floppy
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表