Changes

Jump to: navigation, search

OPS235 Lab 4 - CentOS7 - SSD

1,248 bytes added, 12:31, 13 June 2016
no edit summary
#Perform this part in your '''centos1''' VM.
# Read the man page for the <b><code><span style="color:#3366CC;font-size:1.2em;">useradd</span></code></b> command.
# Create three fictitious users (makea new user called ops235_1 by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">useradd ops235_1</span></code></b># Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">grep ops235_1 /etc/passwd</span></code></b> to see if that user account was created.# View the '''/home''' directory to view the contents. Is the user ops235_1's home directory there?# Issue the following command to create the user called ops235_2: <b><code><span style="color:#3366CC;font-up their userids and full namessize:1. Give each of these newly2em;">useradd -m ops235_2</span></code></b># View the '''/home''' directory to verify that the home directory for ops235_2 has been created users a password.What does the -m option do for the useradd command?# Issue the following command to remove the user called ops235_2: <b><code><span style="color:#3366CC;font-size:1.2em;">userdel ops235_2</span></code></b># Issue the grep command with the /etc/passwd file to verify that the username ops235_2 was removed.# View the contents of the /home directory. Was the home directory for user ops235_2 removed? As root, remove that directory. What option do you need to use with the userdel command to automatically remove the user's home directory?# Issue the userdel comamnd to remove the ops235_1 account (and home directory regardless if it exists or not).    
# Grep the <b><code><span style="color:#3366CC;font-size:1.2em;">/etc/passwd</span></code></b> file for each of the new users.
#* What is the '''home''' directory of each user?
#* Grep the <b><code><span style="color:#3366CC;font-size:1.2em;">/etc/shadow</span></code></b> file for each of the new users.
#* Make note of this information.
# Create two Recreate the new dummy users, (with home directories automatically created) for <b><code><span style="color:#3366CC;font-size:1.2em;">ops235_1</span></code></b> and <b><code><span style="color:#3366CC;font-size:1.2em;">ops235_2</span></code></b>.
# Investigate the home directory of one of your new users.
#* What files are there? Be sure to include hidden files.
13,420
edits

Navigation menu