一、目的
了解用户创建过程
二、操作过程
1、新建一个没有家目录的用户test
[root@localhost ~]# useradd -M test
2、将目录/etc/skel复制创建家目录/home/test
[root@localhost ~]# cp -r /etc/skel /home/test
3、/home/test目录被创建后,其属主及属组都为root
[root@localhost home]# ls -dl /home/test drwxr-xr-x 3 root root 4096 Oct 17 14:15 /home/test [root@localhost home]# ls -al /home/test/ total 56 drwxr-xr-x 3 root root 4096 Oct 17 14:15 . drwxr-xr-x 6 root root 4096 Oct 17 14:15 .. -rw-r--r-- 1 root root 33 Oct 17 14:15 .bash_logout -rw-r--r-- 1 root root 176 Oct 17 14:15 .bash_profile -rw-r--r-- 1 root root 124 Oct 17 14:15 .bashrc -rw-r--r-- 1 root root 515