In: Computer Science
LAB 7.1 MANAGING USER ACCOUNTS
STEP 1. Open a terminal window in linux.
STEP 2. Execute the correct command to display user account information (including the login shell and home directory) for the bin account.
STEP 3. Execute the correct command to display user password information (including the encrypted password and password aging) for the bin account.
STEP 4. The command in step 3 should have failed. Execute the correct su command to change your account so the command from step 3 will be successful when executed.
STEP 5. Create a new user named jake and explicitly use options to create the home directory /home/jake for this user.
STEP 6. Set a password for the jake user to a password of your choosing.
STEP 7. Run the correct command to display the default values used when a new account is created.
STEP 8. Using the less command, display the file that contains the password aging defaults.
STEP 9. Using the less command, display the file that contains the default login shell.
STEP 10. Delete the jake user and his home directory, using a single command.
STEP 1. Open a terminal window in linux.
Answer: You can do that by using the shortcut Ctrl + Alt+ T or by going to menu and finding terminal. YOu can even open terminal by right clicking and selecting terminal.
STEP 2. Execute the correct command to display user account information (including the login shell and home directory) for the bin account.
less /etc/passwd
STEP 3. Execute the correct command to display user password information (including the encrypted password and password aging) for the bin account.
less /etc/shadow
STEP 4. The command in step 3 should have failed. Execute the correct su command to change your account so the command from step 3 will be successful when executed.
sudo less /etc/shadow
STEP 5. Create a new user named jake and explicitly use options to create the home directory /home/jake for this user.
useradd -m jake -d /home/jake
STEP 6. Set a password for the jake user to a password of your choosing.
passwd jake
STEP 7. Run the correct command to display the default values used when a new account is created.
useradd -D
STEP 8. Using the less command, display the file that contains the password aging defaults.
chage -l jake | less
STEP 9. Using the less command, display the file that contains the default login shell.
echo $SHELL | less
STEP 10. Delete the jake user and his home directory, using a single command.
userdel --remove jake