我熟悉useradd
andadduser
命令,但是如果我使用其中的任何一个创建新用户,它将无法登录GUI?这是否意味着在基于GUI的系统上我被迫使用GUI添加新用户?
如果您阅读过man useradd
,将会看到:
DESCRIPTION
useradd is a low level utility for adding users. On Debian,
administrators should usually use adduser(8) instead.
因此,要添加用户,最好使用adduser
。
...但是如果我使用其中任何一个创建新用户,则无法登录GUI
这是完全错误的!使用创建新用户adduser
,创建了新用户使用GUI所需的一切。这是一个例子:
$ sudo adduser test
[sudo] password for xxxx:
Adding user `test' ...
Adding new group `test' (1001) ...
Adding new user `test' (1001) with group `test' ...
Creating home directory `/home/test' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for test
Enter the new value, or press ENTER for the default
Full Name []: Test Test
Room Number []: 7
Work Phone []: 456123
Home Phone []: 123456
Other []: This user is used for tests
Is the information correct? [Y/n] n
Changing the user information for test
Enter the new value, or press ENTER for the default
Full Name [Test Test]:
Room Number [7]:
Work Phone [456123]:
Home Phone [123456]:
Other [This user is used for tests]:
Is the information correct? [Y/n] y
因此,绝对adduser
是使用命令行添加新用户的最佳方法!
另请参阅:man adduser
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句