Web: https://dev.to/mfolarin/the-ultimate-guide-to-user-permissions-management-in-gnulinux-3h63

Jan. 8, 2022, 11:37 a.m. | Folarin Martins

DEV Community dev.to

Create new user

sudo adduser newuser

NOTE: Creating a new user also creates a group by the same name known as the primary group

Change user password

sudo passwd newuser

Grant user admin privileges


with unlimited root access

newuser ALL=(ALL) all

with restricted access

Cmnd_Alias ADMIN1PRIVILEDGES = /usr/bin/adduser, /usr/bin/usermod, /usr/bin/addgroup


Change user home directory

usermod --home /home/newuser newuser

Change user shell

usermod --shell /bin/sh

Add descriptive comment to user

usermod --comment "Here is a new demo user" newuser

Add an account expiry date

usermod --expiredate 2022-12-31 …

linux management

Software Engineer, Platform Infrastructure

@ Udacity, Inc. | Mountain View, CA

Senior Site Reliability Engineering Manager / Head of DevOps (Zurich)

@ Beekeeper | Zürich, Switzerland

Senior Devops/Data Engineer - Finance Automation (US)

@ Hopper | United States

Junior Developer - DevOps

@ Sanne | Madrid, Spain

Engineering Manager, Site Reliability Engineering (Service Operations)

@ Wikimedia Foundation | Remote

Automation Engineer, III (Remote)

@ Stash | New York, NYC