+ -
当前位置:首页 → 问答吧 → useradd的差别?

useradd的差别?

时间:2010-05-26

来源:互联网

今天才发现:
arch里useradd -d /home/abc abc,home里没有abc这个目录
在redhat里同样命令,home里有abc这个目录
为啥?

作者: sanitizer84   发布时间: 2010-05-26

是useradd -m吧, 请先man

作者: zhou3345   发布时间: 2010-05-26

引用:
-d, --home HOME_DIR
The new user will be created using HOME_DIR as the value for the user's login directory. The default is to append the LOGIN name to BASE_DIR and use that as the login directory name. The directory HOME_DIR does not have to exist but will not be created if it is missing.
padding~

作者: huntxu   发布时间: 2010-05-26

楼上两位:
-m -d我知道的,man我也知道的,不是不会用,我是问两个版本里面结果不同的原因
试试看之后再回答我

作者: sanitizer84   发布时间: 2010-05-26

呃。说不上来
偶一直是useradd userdel使用的,好记,而且我默认还真不需要-d 参数,因为随时要调整一些ftp用户

作者: Havanna   发布时间: 2010-05-26

代码:
/etc/default/useradd

作者: 狱卒   发布时间: 2010-05-27