Linux Commands for Testout Security Pro

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

- Create the pwilson user account. - Include the full name, Paul Wilson, as a comment for the user account. - Use the password i8cer3al. - View the /etc/passwd file to verify the account's creation.

useradd -c "Paul Wilson" pwilson psswd pwilson *Enter Password Twice* cat /etc/passwd

- Remove the tbrown user account. - Remove the tbrown home directory. - View the /etc/passwd file and /home directory to verify that the account has been removed.

userdel -r tbrown cat /etc/passwd

- Change the password for the sgarcia user account to G20oly04. - Make sure the password is encrypted in the shadow file.

su -c "passwd sgarcia" *enter current password* *enter new password twice* cat /etc/shadow

- Rename the sales group western_sales. - Create the eastern_sales group. - Assign aespinoza as the only member of the eastern_sales group and remove aespinoza from all other groups. - Verify the changes by viewing the /etc/group file or using the groups command.

groupmod -n western_sales sales groupadd eastern_sales usermod -G eastern_sales aespinoza cat /etc/group

- Remove cflynn from the hr group. - Preserve cflynn's other group memberships. - Verify the changes using the groups command or by viewing the /etc/group file.

groups cflynn usermod -G it,mgmt1 cflynn groups cflynn

- Rename the user account bpalmer. - Change the comment field to read Brenda Palmer. - Change the home directory to /home/bpalmer, moving the contents of the old home directory to the new location. - View the /etc/passwd file and /home directory to verify the account modifications.

ls /home usermod -l bpalmer bmiller usermod -c "Brenda Palmer" bpalmer usermod -d /home/bpalmer -m bpalmer cat /etc/passwd

- In this lab, your task is to change your password to r8ting4str. The current password for the Administrator account is 7hevn9jan.

passwd

- Add the hr group as a secondary group for the mjones and cjohnson user accounts. - View the /etc/group file or use the groups command to verify the changes.

usermod -G hr mjones usermod -G hr cjohnson cat /etc/group

- Lock the following user accounts: vedwards cflynn bkahn - Unlock the following user accounts: mbrown bpalmer aespinoza - View the /etc/shadow file to verify changes.

usermod -L vedwards usermod -L cflynn usermod -L bkahn usermod -U mbrown usermod -U bpalmer usermod -U aespinoza cat /etc/shadow *usermod -l* lists all commands in linux


Ensembles d'études connexes

Geometry True, Sometimes True, False

View Set

Sports and Injuries: Chapter 18,

View Set

Human Needs Neuro and Reproductive

View Set

Ch. 51 Structure and Function Male Reproductive Patho

View Set

Le Petit Prince: Chapitre 7 Questions

View Set

Sensory and Motor Functions of the Cranial Nerves

View Set

PECT PreK-4 Practice Test Modules 1-3

View Set

Computer Science - Chapter 15 (Quiz)

View Set