Answers to practice exercise 2
In this section, we'll copy each item from the list of goals, and explain them while using proper syntax highlighting.
1. Download the necessary file from this book's GitHub repository at https://raw.githubusercontent.com/PacktPublishing/Red-Hat-Enterprise-Linux-8-Administration/main/chapter-19-exercise2/users.txt
wget https://raw.githubusercontent.com/PacktPublishing/Red-Hat-Enterprise-Linux-8-Administration/main/chapter-19-exercise2/users.txt
2. Use the users.txt file to generate users in the system in an automated way using the values provided, in the following order: username, placeholder, uid, gid, name, home, shell
First, let's examine the users.txt
file with the following code:
cat users.txt user;x;1000;1000;myuser1;/home/user1; /bin/false john ;x ;1001 ;1001; John; /home/john ;/bin/false doe ;x ;1001 ;1001; Doe; /home/doe ; /bin/csh athena ;x ;1011 ;1011; Athena Jones; /home/ajones ; /bin/rsh pilgrim ;x ;2011 ;2011...