usermod
Modifies a user account. See also: users, useradd, userdel. More information: <https://manned.org/usermod>.
Install
- All systems
-
curl cmd.cat/usermod.sh
- Debian
-
apt-get install passwd
- Ubuntu
-
apt-get install passwd
- Alpine
-
apk add shadow
- Arch Linux
-
pacman -S shadow
- Kali Linux
-
apt-get install passwd
- Fedora
-
dnf install shadow-utils-2
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install passwd
- Raspbian
-
apt-get install passwd
- Dockerfile
- dockerfile.run/usermod
- Docker
-
docker run cmd.cat/usermod usermod
powered by Commando
Modifies a user account. See also: users, useradd, userdel. More information: <https://manned.org/usermod>.
-
Change a username:
sudo usermod --login new_username username
-
Change a user id:
sudo usermod --uid id username
-
Change a user shell:
sudo usermod --shell path/to/shell username
-
Add a user to supplementary groups (mind the lack of whitespace):
sudo usermod --append --groups group1,group2,... username
-
Change a user home directory:
sudo usermod --move-home --home path/to/new_home username
© tl;dr; authors and contributors