If you list the contents of /home/jerry and /home/tom, you will see that they are empty:
root@ubuntu-linux:~# ls -l /home/tom
total 0
root@ubuntu-linux:~# ls -l /home/jerry
total 0
The reason that both /home/jerry and /home/tom are empty is that the skeleton file /etc/skel is also empty:
root@ubuntu-linux:~# ls -l /etc/skel
total 0
WHAT IS /etc/skel?
This is the skeleton file. Any file or directory you create in /etc/skel will be copied to the home directory of any new user created.
This is the skeleton file. Any file or directory you create in /etc/skel will be copied to the home directory of any new user created.
Now, with your favorite text editor, create the file welcome.txt in /etc/skel and insert the line "Hello Friend!" in it:
root@ubuntu-linux:/etc/skel# ls
welcome.txt
root@ubuntu-linux:/etc/skel# cat welcome.txt
Hello Friend!
Alright, so now you have created the file welcome.txt in /etc/skel, which means that any new user created will now have the file welcome.txt in their home directory. To demonstrate, let's create a new user named edward and then we will take a peek at...