linux_wiki:create_delete_and_modify_local_user_accounts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux_wiki:create_delete_and_modify_local_user_accounts [2016/02/29 21:56]
billdozor created
linux_wiki:create_delete_and_modify_local_user_accounts [2018/03/18 23:59]
billdozor [Modifying Users]
Line 3: Line 3:
 **General Information** **General Information**
  
-About this page/how-to/script.+Expect to create some local user accounts and add them to groups on the exam.
  
 ---- ----
 +
 +===== User IDs and Files =====
  
 User IDs User IDs
Line 16: Line 18:
   * /etc/passwd - user account details   * /etc/passwd - user account details
   * /etc/shadow - user account's hashed password and password age/expiry details   * /etc/shadow - user account's hashed password and password age/expiry details
 +
 +Useradd default settings:
 +  * /etc/default/useradd
 +
 +Login default settings
 +  * /etc/login.defs
 +
 +----
 +
 +===== Adding Users =====
  
 Add user with default settings Add user with default settings
Line 24: Line 36:
   * Users may belong to many other supplementary groups.   * Users may belong to many other supplementary groups.
  
-Useradd default settings: +\\ 
-  * /etc/default/useradd+Adding a user with a specific UID 
 +<code bash> 
 +useradd -u 5000 rjones 
 +</code> 
 +  * Creates a user "rjones" with a UID of "5000"
  
-Login default settings +---- 
-  * /etc/login.defs+ 
 +===== Modifying Users =====
  
 User comment, usually for a full name (also known as the GECOS field) User comment, usually for a full name (also known as the GECOS field)
Line 35: Line 52:
 </code> </code>
  
-Lock user account (user cannot login)+\\ 
 +Lock user account password (user cannot login with password)
 <code bash> <code bash>
 usermod -L rjones usermod -L rjones
Line 42: Line 60:
   * Use "usermod -e 1 rjones" to immediately disable the account. (-e = expire date; the date the account will be disabled)   * Use "usermod -e 1 rjones" to immediately disable the account. (-e = expire date; the date the account will be disabled)
  
 +\\
 Unlock user account Unlock user account
 <code bash> <code bash>
Line 47: Line 66:
 </code> </code>
  
 +\\
 Stop user from logging into a shell Stop user from logging into a shell
 <code bash> <code bash>
Line 52: Line 72:
 </code> </code>
  
 +\\
 Delete user account Delete user account
 <code bash> <code bash>
  • linux_wiki/create_delete_and_modify_local_user_accounts.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)