Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do 3,4,5: Lab 9: User and Group Accounts 1. Login to your user account and su to root. Then run the below command: yum

Please do 3,4,5:

Lab 9: User and Group Accounts 1. Login to your user account and su to root. Then run the below command: yum install system-config-users After installation run the command system-config-users from your terminal. User Manager window will open. You should find four accounts: your account (from lab 0), Student, foxr, zappaf. a. What user ID does Student have? What is Students login shell and home directory? b. Click on the Groups tab. What is Students Group ID and group name and what members are in that group? c. Go back to the Users tab, click Add User. Fill in the following: User Name: marst. Full Name: Tommy Mars. Enter and confirm a password (any password, if the password is too weak, use it anyway), leave login shell and home directory as the defaults, leave private group box checked, use the default for user ID. Click OK. A new user will appear in the User Manager window. What is this users ID? d. Highlight user marst, click Properties to change info on the user. There are four tabs: user data, account info, password info, and groups. Click on each to explore them. To set password expiration information, first click on the Enable password expiration checkbox. To add this user to a group, you just check any group you wish in the list under the Groups tab. While marsts user properties window is open, expire marsts password tomorrow. How did you accomplish this? Close the properties window. e. In your terminal window, type ls /home/marst. What was output? Why? su to root. Redo the ls command. No files. Type ls al /home/marst. What do you find there? Obviously you did not create these files, so how did these files get created? f. As root type passwd marst to change his password to keys and confirm it (note that you are not asked for the original password!) What warning did you get? If you just typed passwd without marst, you would be changing roots password, so be careful! g. Type su marst (you are not asked to enter a password because root can switch to any user!). Type exit to switch back to root and exit again to switch back to your profile. Type su marst. Enter the password (keys). Type whoami. What was displayed? Type exit. Who are you now? h. Switch to the Group tab in the User Manager GUI. There are already 5 groups, one for each user. These are private groups. What is a private group? Why were they automatically created for users? Create a new group, cit371. Select the new group and select Properties. From the Properties window, click the Group Users tab and check the box for yourself to add your account to the group. Close the group properties, switch back to the Users tab, select marst and select Properties. Click on the Groups tab and select cit371. Click back on the Groups tab you should see two users added to the cit371 group. Create another group called informatics. How did you do this? Leave its membership blank for now. Close the User Manager GUI. Attach the screenshots here. Su to root for the remainder of the lab except as noted. 2. You will create users and groups through the command line using useradd and groupadd. Both programs are in /usr/sbin, which should be in your PATH; if not, you will have to specify the full path in the commands. a. Type useradd and create an account for Ruth Underwood giving her name as a comment, add her to the group cit371, and give her an username of underwoodr. What command did you enter? Use the passwd command to give her an initial password of xylophone. What warning message did you get because of the password? b. Use groupadd to create two groups: students and minjas. What commands did you enter? Now create the group dummies and give the group the GID of 2000. What command did you enter? c. Create the following users with the given names and usernames and use the defaults for everything else except as noted. Place the instruction used into your answers. i. Suzie Creamcheese, creamcheeses (username), default login shell /bin/tcsh ii. Eric Cartman, cartmane (username), groups cit371 and informatics, UID of 1001 (user ID may not be unique, if not then fix the issue and make sure that multiple users can share the same user ID!! iii. ) iv. CIT 371 Student, cit371 (username). What error dig this give you? To fix the problem, create the account with no private group. d. Use the passwd to give the three users from c initial passwords of xyz12abc, cheesypoofs and a password of your own making respectively. What warnings did each give you if any? e. Use userdel to delete marst. What command did you enter? Use userdel to delete creamcheeses but leave creamcheesess home directory. What command did you enter? Type ls /home, of marst and creamcheeses, do either still have a directory? 3. Examine the files /etc/passwd, /etc/group and /etc/shadow. a. Use a Linux instruction to count the number of accounts in /etc/passwd. What command did you use? How many did you find and how? b. In looking at the entries in /etc/passwd, you should notice that UIDs change after Eric Cartman. Why? (hint: look at 2c) c. Inspect some of the pre-existing accounts (these appear in the file prior to your user account). What is the home directory for root? For bin? For lp? For mail? d. Examine /etc/group. What entry do you find for your own user group? Who is in bin? adm? e. Look at the contents of the file /etc/shadow (the passwords file). What information do you find in marsts entry that is not present in your own? 4. The chage and passwd commands control when users must modify their passwords. Examine their man pages. a. Type chage l marst. When does marsts password expire? When was marsts password last changed? Set the maximum number of days for marst to 60 and warning to 5. What commands did you enter? Redo the chage l command to make sure the password expiration has changed (it should have). Attach a screenshot here. b. Using the expiration date option of chage, change cartmanes password to expire on May 14, 2018 with an inactivity of 7 days (that is, the account will be locked if the password is not changed within 7 days of the passwords expiration). What command did you enter? c. Without options, chage is interactive. Type chage cit371. Set the minimum password age from 0 to 100, leave maximum password age and last password change as is, set the password expiration warning to 14, password inactive value to 7, and account expiration as June 1, 2018. How can you confirm (view) the changed values? Attach a screenshot here. d. Use passwd to lock zappafs account. su to your user account, then su to zappaf (passwd is linuxiscool). What happened? Why? Exit your user account to root, su to zappaf. Were you successful? Now, as zappaf (from root), attempt to change zappafs password to fzmoi33 (you will first be asked for the original password, linuxiscool). What message did you receive? Return to root and unlock zappafs password. How did you do this? 5. New users are given some initial files. Go to /etc/skel. Use ls a to view the files (they all start with a . so they are all hidden). These files get copied into the home directory of all new users (who have their own directories). a. Of the items listed, there are few directories. There are three files present, .bash_logout, .bash_profile and .bashrc. Attach screenshot.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

How does matching relate to accruals and deferrals?

Answered: 1 week ago