你的位置:
问答吧
-> Linux
-> 问题详情
求解释: useradd -g mysql mysql -d /home/mysql -s /sbin/nologin
每个参数都是什么意思?整个命令起到的作用...谢谢!
作者: bacy001
发布时间: 2011-05-24
man useradd
-g, --gid gid
The group name or number of the user's main group. The group name or number must refer to an already existing group. If not specified, the default
from /etc/default/useradd is used.
-d, --home homedir
This option specifies the users home directory. If not specified, the default from /etc/default/useradd is used.
-s, --shell shell
Specify user's login shell. The default for normal user accounts is taken from /etc/default/useradd/, the default for system accounts is /bin/false.
作者: justkk
发布时间: 2011-05-24
新增一个用户,分别设定组ID、HOME目录、登录shell
作者: justkk
发布时间: 2011-05-24
其实这个命令的 主要偏重点是让mysql服务用的mysql用户不可以登录系统。
作者: steptodream
发布时间: 2011-05-24
useradd -g mysql mysql -d /home/mysql -s /sbin/nologin
man useradd
大概就是增加mysql这个用户,同时添加到mysql组理,主目录是/home/mysql 不给登录shell
作者: lgxwqq111
发布时间: 2011-05-24
man useradd
-g, --gid gid
The group name or number of the user's main group. The group name or number must refer to an already existing group. If not specified, the default
from /etc/default/useradd is used.
-d, --home homedir
This option specifies the users home directory. If not specified, the default from /etc/default/useradd is used.
-s, --shell shell
Specify user's login shell. The default for normal user accounts is taken from /etc/default/useradd/, the default for system accounts is /bin/false.
useradd -g mysql mysql -d /home/mysql -s /sbin/nologin
man useradd
大概就是增加mysql这个用户,同时添加到mysql组理,主目录是/home/mysql 不给登录shell
作者: yong_f
发布时间: 2011-05-24