Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

References .Chapter 7: Adding New Users Manpages for passwd, chsh, chfn, finger,

ID: 3605901 • Letter: R

Question

References .Chapter 7: Adding New Users Manpages for passwd, chsh, chfn, finger, useradd, userdel, vipw . Files: letc/passwd letc/group letc/shells Lab Questions You will need to be logged in as root on both of your virtual machines for this lab. Some of the questions will also require reading manpages for other systems (search the web with your favorite search engine). 1. What is the significance of the-in the command. ? What would happen if you left it off? 2. View letc/passwd on each virtual machine. Describe the format of a line. How many users are already created for each system? 3. What are the specifications for login names? (length, 4. How long can a password be on CentOS? On Debian? 5. What type of hash algorithm does CentOS use on 6. Is it possible to assign two users that same UID on the 7. What groups are you in? What is your effective GID? 8. What command will let you change your shell from the type of characters) On Solaris? passwords? Debian? Solaris? same system? Should you do so? (Answer for all systems) prompt. What shells are available to you? (Answer for all systems) 9. Change your GECOS information on CentOS. What command did you use? How can you check to ensure it worked? 10. Where are the default user startup files located on 11. 12. 13. Centos? On Debian? We're asking about the scripts that run when a user logs in. When you create a new user, where do those scripts come from? Create a user account on both systems. List the steps you followed How can you give this user the ability to 'su' to root? (Answer for both systems) Remove a user account on both systems. List the steps you followed.

Explanation / Answer

2.

tom - username , x - password , 1000 - userid , 1000 - groupid , Sam Gite - Userid info , /home/vivek - Home Directory , bin/bash - Command Shell

You can run the following command to find out users on your system :

$ cat /etc/passwd

$ grep tom /etc/passwd // in this case it's tom you can replace it with whatever username appear on your system. Also note that $ is just to show starting of each command and will be removed while copying it for actual use. In general if you use a shared system you can safely say that the number of users are little less then the strenght of your class.

3.A basic gnu/linux username is a 32 character string. Other than that there are the following restrictions : cannot use CAPITAL LETTER, cannot use dots anywhere, cannot use dash at the end of name, Login name must not include colons.

4. On Solaris - 255 characters

On Debian - 8 character

On CentOS - 8 character like debian.

In case you are using MD5 or SHA1 there is no limit on password length itself because these hashes can be created from any amount of data

5. CentOS - MD5 and SHA512

Solaris - SHA256, FIPS140 and MD5

Debian - SHA512, MD5

6. Yes you can assign multiple users with same user id but it will create problems while assigning permissions and setting restrictions.

7. (check you groupid id on your system as mentioned in 2nd answer, groupid with your user info)

8. To check the shell on our system we can use the following command :

(Use the above command to find the shells on your system)

9. To change your GECOS infromation you have to use the folowing command:

chfn [-f full_name] [-r room_no] [-w work_ph] [-h home_ph]

(your command should look something like this : $ sudo chfn -f "Anakin Skywalker" anakin)

To comfirm that it worked we use the following command on root, (which will look like output in answer 2nd)

$ cat /etc/passwd

$ grep tom /etc/passwd  

11. The following command will add the user to the new user to the system

sudo adduser test1

sudo passwd (after this enter the password for first system)

sudo useradd test2

sudo passwd (for second system, note that sudo is not required if you are working on root, to switch to root you can use following command : cd)

13. deluser test1 (for debian)

userdel test2 (for centos)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote