|
发表于 2004-9-30 19:14:27
|
显示全部楼层
最初由 babo 发表
useradd
-m 代表修改的意思,第一次创建用户不用这个
-g 代表用户属于哪个组
-s 代表用户目录
以上是我个人的理解,还望大家指点
你的理解不完全正确,这是man useradd的有关说明:
- -m The user's home directory will be created if it does not exist. The files contained in
- skeleton_dir will be copied to the home directory if the -k option is used, otherwise
- the files contained in /etc/skel will be used instead. Any directories contained in
- skeleton_dir or /etc/skel will be created in the user's home directory as well. The -k
- option is only valid in conjunction with the -m option. The default is to not create
- the directory and to not copy any files.
- -g initial_group
- The group name or number of the user's initial login group. The group name must exist.
- A group number must refer to an already existing group. The default group number is 1
- or whatever is specified in /etc/default/useradd.
- -s shell
- The name of the user's login shell. The default is to leave this field blank, which
- causes the system to select the default login shell.
复制代码 |
|