Difference between revisions of "User Management- Linux"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
(Created page with "* useradd: standard system command to add a user to the system. * adduser: script to add a user to the system. * userdel: delete a user account and optionally related files. *...")
 
m
 
(2 intermediate revisions by one user not shown)
Line 5: Line 5:
 
* delgroup: remove a group from the system.
 
* delgroup: remove a group from the system.
 
* usermod: modify a user account.
 
* usermod: modify a user account.
 +
 +
* vipw
 +
* vigr
  
 
== Adding Users to the System ==
 
== Adding Users to the System ==
Line 12: Line 15:
 
# .bash_profile
 
# .bash_profile
 
# .bashrc
 
# .bashrc
 +
 +
Common Usage Example:
 +
useradd -u 1006 -c "Nicole Ploof" -m -s /bin/bash nicolep
 +
 +
Although not necessary, you can specify a userid to fit your own system numbering schema. 
  
 
=== adduser vs useradd ===
 
=== adduser vs useradd ===
Line 19: Line 27:
 
*adduser, addgroup - add a user or group to the system
 
*adduser, addgroup - add a user or group to the system
 
*useradd - create a new user or update default new user information
 
*useradd - create a new user or update default new user information
 +
 +
== Related ==
 +
* [[Console Command Reference]]
 +
* [[User Management- OpenBSD]]
 +
 +
[[Category:Computer_Technology]]
 +
[[Category:Linux]]

Latest revision as of 14:26, 2 April 2020

  • useradd: standard system command to add a user to the system.
  • adduser: script to add a user to the system.
  • userdel: delete a user account and optionally related files.
  • addgroup: script to add a group to the system.
  • delgroup: remove a group from the system.
  • usermod: modify a user account.
  • vipw
  • vigr

Adding Users to the System

The following hidden files are copied into the user’s home directory, and will be used to provide environment variables for his/her user session.

  1. .bash_logout
  2. .bash_profile
  3. .bashrc

Common Usage Example:

useradd -u 1006 -c "Nicole Ploof" -m -s /bin/bash nicolep

Although not necessary, you can specify a userid to fit your own system numbering schema.

adduser vs useradd

Adduser is not a standard Linux command. Adduser is not available on some Linux distributions. On others, it is a soft link to useradd. While on some others, it is a Perl script.

Both commands have a man page on most linux distributions

  • adduser, addgroup - add a user or group to the system
  • useradd - create a new user or update default new user information

Related