Howto manage user and groups

From Vidalinux Wiki
Revision as of 21:30, 3 September 2021 by 10.65.50.93 (talk) (Created page with "= creating users = add user and create home folder: useradd -m student specify shell when creating the user: useradd -m -s /bin/bash student specify another location for use...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

creating users

add user and create home folder:

useradd -m student

specify shell when creating the user:

useradd -m -s /bin/bash student

specify another location for user home folder:

useradd -m -d /opt/student student

specify default group name:

useradd -m -g student 

specify userid:

useradd -m -u 1000 student

create user and this user to different groups:

useradd -m -g student -G video,docker,sound,lp student

assign password to user:

passwd student

manage groups

add group:

groupadd vidalinux

add user to group:

gpasswd -a student vidalinux

add user to more than one group:

usermod -G wheel,video,sound,lp student

to list all groups on our system:

less /etc/group