Source
tl;dr
For when I inevitably forget this because I’m only ever on a single-user system.
The following nested find command searches all /bin
directories within 3 levels from the root for commands containing group or user.
(This was probably way simpler to do by correctly using apropos
or man -k
or just looking through the linked manpages, but hey, I’m on a find
kick.)
- Prefer
adduser
overuseradd
-adduser
will prompt for information such as password, will add to the users group, and create a home directory - but know how to useuseradd
in a pinch. - Server Fault - useradd vs adduser
Create new user
Create new group
Create a new user with useradd
List existing groups on the system
Deleting users and groups
btw
Changing to root user
An interesting tidbit: my default of sudo su
preserves the working directory, while sudo -i
takes you to the root user’s home directory of /root
.
nologin
moving up and down wrapped lines in vi/vim
EOF