Skip to content

Instantly share code, notes, and snippets.

@ericandrewlewis
Last active August 29, 2015 14:19
Show Gist options
  • Save ericandrewlewis/d4ac45fb78f0f2cd8e38 to your computer and use it in GitHub Desktop.
Save ericandrewlewis/d4ac45fb78f0f2cd8e38 to your computer and use it in GitHub Desktop.
On Linux Administration

On Linux Administration

User management

/etc/passwd lists all users. One per line, in the format {username}:{password}:{user-id}:{user-info}:{path-to-user's-home-directory}:{path-to-user-shell-program}

Create a new user account

useradd [options] username

On most systems, creating a user account automatically creates a group with the name of that user.

Groups

/etc/groups lists all user groups. One per line, in the format {group-name}:{password}:{group-id}:{comma-separated-list-of-users-in-group}

groups command lists groups a user is a member of. e.g. groups eric

External Links

LINUX Admin Quick Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment