[问题]终端里如何添加删除用户??

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#16

帖子 eexpress » 2007-08-30 10:52

useradd建立了profile的。缺省型的。
● 鸣学
头像
iblicf
帖子: 3766
注册时间: 2007-01-15 17:15

#17

帖子 iblicf » 2007-08-30 11:03

用什么命令呢,,俺都是直接编辑 /etc/passwd , /etc/group
头像
xhy
帖子: 3916
注册时间: 2005-12-28 1:16
系统: Ubuntu 12.10 X64
来自: 火星

#18

帖子 xhy » 2007-08-30 11:11

iblicf 写了:用什么命令呢,,俺都是直接编辑 /etc/passwd , /etc/group
然后手算shadow?
目前负债150多万
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#19

帖子 eexpress » 2007-08-30 11:23

iblicf
大放厥词。担心警告。

那shell设置会乱套的。
● 鸣学
头像
iblicf
帖子: 3766
注册时间: 2007-01-15 17:15

#20

帖子 iblicf » 2007-08-30 13:14

???,, 当然可以阿,shadow 干么要算呢,copy阿,passwd改阿, shell怎么会乱呢? ,,这样完全不用记useradd / group 命令 ,更直解有效 , 俺一直这么做得 ... 顺便说 useradd / adduser还不是链接关系
valhelsing
帖子: 200
注册时间: 2007-01-03 17:10

#21

帖子 valhelsing » 2007-08-30 13:16

man useradd
man userdel
头像
xhy
帖子: 3916
注册时间: 2005-12-28 1:16
系统: Ubuntu 12.10 X64
来自: 火星

#22

帖子 xhy » 2007-08-30 13:56

代码: 全选

saga@Gentoo ~ $ ls -l /usr/sbin/adduser 
lrwxrwxrwx 1 root root 7 2007-08-27 13:40 /usr/sbin/adduser -> useradd

在一些系统中 adduser就是个符号连接
adduser也并非所有的系统都提供

代码: 全选

 6.1.  Slackware adduser program

  Slackware distributions (and possibly some others) contain a
  interactive program for adding users called /sbin/adduser.  A shadow
  version of this program can be obtained from 
  ftp://sunsite.unc.edu/pub/Linux/
  system/Admin/accounts/adduser.shadow-1.4.tar.gz.

  I would encourage you to use the programs that are supplied with the
  Shadow Suite (useradd, usermod, and userdel) instead of the slackware
  adduser program.  They take a little time to learn how to use, but
  it's well worth the effort because you have much more control and they 
  perform proper file locking on the /etc/passwd and /etc/shadow file 
  (adduser doesn't).

  See the section on ``Putting the Shadow Suite to use'' for more 
  information.
目前负债150多万
回复