Name:
Course:
Gp:
Module Intended Learning Outcome (#2):
On completion of the module, students are expected to be able to:
Perform system management tasks of the most common operating systems in the industry by using both command line interface and GUI.
Lesson Intended Learning Outcome:
On completion of this workshop, students are expected to be able to:
Manage user accounts in Linux.
Adding Users in Linux
Step 1: Creating Accounts
Login as root.
Step 1.1: The useradd Command
To learn the details of the useradd command, at the command prompt, at the shell type: man useradd
Find out what do the following switches do.
-c
--comment COMMENT
Any text string. It is generally a short description of the login, and is currently used as the field for the user's full name
-d
--home HOME_DIR
The new user will be created using HOME_DIR as the value for the user's login directory. The default is to append the LOGIN name to BASE_DIR and use that as the login directory name. The directory HOME_DIR does not have to exist but will not be created if it is missing.
Type q to exit the man page.
Step 1.2: Adding Users
Create user accounts for Maria Chavez and Gloria Chan respectively: useradd –c "May Lam" may useradd –d /gloria_home –c "Gloria Chan" gloria
Where are the home directories of may and gloria respectively?
/home/may
/gloria_home
Write down the command that will be used to create a user account, david, for David Wong with home directory at /david_home. useradd –d /david_home –c "David Wong" david
Step 1.3: The passwd Command
Run the command: logout
Login as ‘gloria’, under the password type ENTER.
Can you login to Linux with new user ‘gloria’? Why?
NO. it is because Gloria does not have a password.
To learn the details of the passwd command prompt, at the shell type: man passwd
Briefly describe the following passwd switches:
-l:
This option is used to lock the specified account and it is available to root only. The