You are on page 1of 11

Lab 5

3. Explore characteristics of the current student login environment.

a. View the user and group information and display the current working directory.

b. View the variables which specify the home directory and the locations searched for executable files.

4. Switch to root without the dash and explore characteristics of the new environment.

a. Become the root user at the shell prompt.

b. View the user and group information and display the current working directory. Note the identity
changed, but not the current working directory.
c. View the variables which specify the home directory and the locations searched for executable files.
Look for references to the student and root accounts.

d. Exit the shell to return to the student user.

6. Run several commands as student which require root access.

a. View the last 5 lines of the /var/log/messages.


b. Make a backup of a configuration file in the /etc directory.

c. Remove the /etc/motdOLD file that was just created.

d. Edit a configuration file in the /etc directory.


5.6. Practice: Creating Users Using Command-line Tools
3. Become the root user at the shell prompt.

4. Add the user juliet.

5. Confirm that juliet has been added by examining the /etc/passwd file.

6. Use the passwd command to initialize juliet's password.


7. Continue adding the remaining users in the steps below and set initial passwords.

a. romeo

b. hamlet

c. reba

d. dolly

e. elvis
5.8. Practice: Managing Groups Using Command-line Tools
Create a supplementary group called shakespeare with a group ID of 30000.

3. Create a supplementary group called artists.

4. Confirm that shakespeare and artists have been added by examining the /etc/group file.

5. Add the juliet user to the shakespeare group as a supplementary group.

6. Confirm that juliet has been added using the id command.

7. Continue adding the remaining users to groups as follows:

a. Add romeo and hamlet to the shakespeare group.

b. Add reba, dolly, and elvis to the artists group.

c. Verify the supplemental group memberships by examining the /etc/group file.

5.10. Practice: Managing User Password Aging


1. Explore locking and unlocking accounts.

a. Lock the romeo account.

b. Attempt to log in as romeo.

c. Unlock the romeo account.


2. Change the password policy for romeo to require a new password every 90 days.

3. Additionally, force a password change on the first login for the romeo account.
4. Log in as romeo and change the password to forsooth123.

5. Expire accounts in the future.

a. Determine a date 180 days in the future.

b. Set accounts to expire on that date.

Reset your serverX system.

1. Ensure that newly created users have passwords which must be changed every 30 days.
2. Create a new group named consultants with a GID of 40000.

3. Create three new users: sspade, bboop, and dtracy, with a password of default and add them to
the supplementary group consultants. The primary group should remain as the user private group.
3. Determine the date 90 days in the future and set each of the three new user accounts to expire
on that date.

4. Change the password policy for the bboop account to require a new password every 15 days.

You might also like