Menu

[Solved]Lab Exercise 2 Managing Users Groups Linux Centos Run Program Linux Centos Show Screen Sho Q37250327

Lab Exercise 2: (Managing Users and Groups) (Linux CentOS )

========================Run the program (Linux CentOS ) and showscreen shots================================

Groups tie together users that have a commonpurpose. For example, an organization may have

persons responsible for accounts payable and others responsiblefor payroll.

By placing the user accounts in an accountspayable group then common permissions can be given to all themembers of that group.

Several files are used when creating users in Linux. Thefollowing are a few most commonly used.

 /etc/passwd

 /etc/shadow

 /etc/group

   /etc/passwd

 The /etc/passwd file is world-readable and contains a list ofusers, each on a separate line. On each line is a colon delimitedlist containing the following information:

 Username — The name the user types when logging into thesystem.

 Password — Contains the encrypted password (or an x if shadowpasswords are being used — more on this later).

 User ID (UID) — The numerical equivalent of the username whichis referenced by the system and applications when determiningaccess privileges.

 Group ID (GID) — The numerical equivalent of the primary groupname which is referenced by the system and applications whendetermining access privileges.

 Home directory — The absolute path to the user’s homedirectory, such as /home/juan/.

 Shell — The program automatically launched whenever a userlogs in. This is usually a command interpreter (often called ashell). Under Red Hat Linux, the default value is /bin/bash. Ifthis field is left blank, /bin/sh is used. If it is set to anon-existent file, then the user will be unable to log into thesystem.

Here is an example of a /etc/passwd entry:

jlo:x:537:100:Jenni Lo:/home/jlo:/bin/bash

This line says:

• account name is ‘jlo’

• password is required (‘x’ represents the encryptedpassword)

• numerical user ID is 537

• default group is a group with group ID 100

• the comments are ‘Jenni Lo’

• the default home directory is ‘/home/jlo’

• the default login shell is ‘/bin/bash’

/etc/shadow

The /etc/shadow file contains the encrypted passwords and otherpassword information. This file is viewable by the root user only.To view the /etc/shadow file use the following commands:

The /etc/shadow file is a group of fields separated with a colon(:).

juan: $1s. QKDPc5E$SWlkjRWexrXYgc9aF. :11956:0: 90:5:30:12197:

Note: This line shows the following information for userjuan:

• $1$.QKDPc5E$SWlkjRWexrXYgc98F.: – This is the password afterbeing encypted.

• 11956 – How many days since the password was last changed

• 0 – There is no minimum amount of time required before thepassword can be changed

• 90 – The password must be changed every 90 days

• 5 – The user will get a warning five days before the passwordmust be changed.

• 30 – The account will be disabled 30 days after the passwordexpires if no login attempt is made

• 12197 –Password expiration

/etc/group

• The /etc/group file is world-readable and contains a list ofgroups, each on a separate line. Each line is a four field, colondelimited list including the following information:

– Group name — The name of the group. Used by various utilityprograms as a humanreadable identifier for the group.

– Group password — If set, this allows users that are not partof the group to join the group by using the newgrp command andtyping the password stored here. If a lower case x is in thisfield, then shadow group passwords are being used.

– Group ID (GID) — The numerical equivalent of the group name.It is used by the operating system and applications whendetermining access privileges.

– Member list — A comma delimited list of the users belonging tothe group.

Here is an example line from /etc/group:

general:x:502:juan,shelley,bob

This line shows that the general group is using shadowpasswords, has a GID of 502, and that juan, shelley, and bob aremembers.

/etc/gshadow

• The /etc/gshadow file is readable only by the root user andcontains an encrypted password for each group, as well as groupmembership and administrator information.

• Just as in the /etc/group file, each group’s information is ona separate line.

• Each of these lines is a colon delimited list including thefollowing information:

– Group name —

– Encrypted password

– Group administrators

– Group members

• /etc/gshadow:

general:!!:shelley:juan,bob

• This line shows that the general group has no password anddoes not allow non-members to join using the newgrp command. Inaddition, shelley is a group administrator, and juan and bob areregular, non-administrative members

juan: $1s. QKDPc5E$SWlkjRWexrXYgc9aF. :11956:0: 90:5:30:12197: Show transcribed image text juan: $1s. QKDPc5E$SWlkjRWexrXYgc9aF. :11956:0: 90:5:30:12197:

Expert Answer


Answer to Lab Exercise 2: (Managing Users and Groups) (Linux CentOS ) ========================Run the program (Linux CentOS ) and … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *