User Tools

Site Tools


linux:managing-users-and-groups-part-2

Differences

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

Link to this comparison view

linux:managing-users-and-groups-part-2 [2019/01/21 11:15] (current)
seanburns created
Line 1: Line 1:
 +<​markdown>​
 +# User and Group Commands
 +## Date: Wed Sep 26 13:10:54 EDT 2018
  
 +List of user and user environment commands:
 +
 +- ``logname`` : print user's login name
 +- ``whoami`` : print effective userid
 +- ``id`` : print real and effective user and group IDs
 +- ``w`` : show who is logged on and what they are doing
 +- ``who`` : show who is logged on
 +- ``users`` : print the user names of users currently logged in to the current host
 +- ``last`` : show a listing of last logged in users
 +- ``printenv`` : print all or part of environment
 +- ``finger`` : user information lookup program (see ``chfn`` below)
 +- ``pinky`` : lightweight finger (see ``chfn`` below)
 +
 +Create, change, or modify user accounts: ​
 +
 +- ``useradd`` : create a new user or update default new user information
 +- ``userdel`` : delete a user account and related files
 +- ``usermod`` : modify a user account
 +- ``passwd`` : change user password
 +- ``chpasswd`` : update passwords in batch mode
 +- ``chfn`` : change real user name and information
 +- ``chsh`` : change login shell
 +
 +Create, change, or modify group accounts:
 +
 +- ``groups`` : print the groups a user is in
 +- ``groupadd`` : create a new group
 +- ``groupdel`` : delete a group
 +- ``groupmod`` : modify a group definition on the system
 +
 +Note: some of the above commands have "​friendlier"​ versions on some
 +systems. These include the following. However, it's always seemed that
 +the ``useradd`` etc versions are more easily scriptable. In any case,
 +see the *man* pages:
 +
 +- ``adduser`` : add a user to the system
 +- ``addgroup`` : add a group to the system
 +
 +## Source:
 +
 +A few of commands were added, but most of the above commands were neatly organized for reference in:
 +
 +Barrett, Daniel J. (2004). *Linux: Pocket guide*. Sebastopol: O'​Reilly Media, Inc. 
 +
 +Descriptions of the above commands come from the NAME field in the
 +respective man pages. I.e., by using:
 +
 +```bash
 +man -k <​command>​
 +``` 
 +</​markdown>​
linux/managing-users-and-groups-part-2.txt ยท Last modified: 2019/01/21 11:15 by seanburns