Skip to content

Instantly share code, notes, and snippets.

@szabacsik
Last active May 4, 2022 12:05
Show Gist options
  • Save szabacsik/025d295cc6d20f299dbf3bda577ecc69 to your computer and use it in GitHub Desktop.
Save szabacsik/025d295cc6d20f299dbf3bda577ecc69 to your computer and use it in GitHub Desktop.
User Management

Linux User Management

create group with group id

groupadd -g 1000 johndoe

create user with user id and group id

useradd -m --home /home/johndoe johndoe --uid 1000 --gid 1000 --groups group1,group2,sudo

add user to sudoers group

usermod -aG sudo apache

set bash as the default shell

usermod -s /bin/bash apache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment