Difference between revisions of "Lab 4 Warnings / Debrief"
Line 22: | Line 22: | ||
Various Linux commands for user account management includes: | Various Linux commands for user account management includes: | ||
+ | |||
:* '''useradd''' - Creates a user account in /etc/passwd file (the option -m creates a home directory for the user) | :* '''useradd''' - Creates a user account in /etc/passwd file (the option -m creates a home directory for the user) | ||
:* '''userdel''' - Removes an existing user account contained in the /etc/passwd file (the option -r removes the user's home directory as well) | :* '''userdel''' - Removes an existing user account contained in the /etc/passwd file (the option -r removes the user's home directory as well) | ||
:* '''usermod''' - Modifies fields contained in the /etc/passwd file for that particular username | :* '''usermod''' - Modifies fields contained in the /etc/passwd file for that particular username | ||
+ | |||
The '''/etc/skel''' directory can contain files (as a template) for newly created user accounts to have. This helps to automate the task of continually creating new accounts without having to create the same default files after account creation. | The '''/etc/skel''' directory can contain files (as a template) for newly created user accounts to have. This helps to automate the task of continually creating new accounts without having to create the same default files after account creation. |
Revision as of 13:17, 2 November 2015
Contents
Preparing for Lab 4
Purpose of Lab 4
The /etc/passwd file
The /etc/passwd file contains user account information for the Linux system.
It is comprised of several fields:
- Username
- Password: An x character indicates that encrypted password is stored in /etc/shadow file.
- User ID (UID)
- Group ID (GID)
- User ID Information
- Default Home directory
- Default shell
Managing User Accounts
A Linux system administrator will be required to manage user accounts on an on-going basis.
Various Linux commands for user account management includes:
- useradd - Creates a user account in /etc/passwd file (the option -m creates a home directory for the user)
- userdel - Removes an existing user account contained in the /etc/passwd file (the option -r removes the user's home directory as well)
- usermod - Modifies fields contained in the /etc/passwd file for that particular username
The /etc/skel directory can contain files (as a template) for newly created user accounts to have. This helps to automate the task of continually creating new accounts without having to create the same default files after account creation.
Common Mistakes / Warnings
Preparing for Lab Sign-Off
In order to properly complete your lab and move to the next lab, you must have your instructor "sign-off" on your lab
- Each "signed-off" lab (before due date) is worth 1% of your final grade.
- Signing-off on labs help to spot errors that can cause problems with future labs.
- Do you ask the instructor what to check for! Read at the bottom of the lab the requirements, and have all proof available for instructor to view at same time.
- Failing to be prepared and asking instructor what to check when assignment is mark will result in deduct of marks!
- For example, open multiple terminals with command results. If properly set-up ahead of sign-off, the process should only take instructor approx 20 seconds to sign-off your lab.
- If you do not have your lab-logbook, you MUST show your work and your lab log-book to your instructor for sign-off in the next class. This may cause a late penalty if past the required due date.