Linux users and groups for beginners! (explained in 4 minutes)

preview_player
Показать описание
Linux users and groups explained! What are they about and how to use them?
How to create new users in linux?

#linuxbasics #linux #adduser

*Used commands:*
chown -R devops:editors /data - recursively change the ownership of directory /data to user: devops and group: editors
chmod -R u+w /data - recursively add write(w) permissions for the user(u) for directory /data
chmod -R g+r /data - recursively add read(r) permissions for the group(g) for directory /data
chmod -R o-rwx /data - recursively remove all permissions for others for directory /data
useradd -c "this is me" -d /home/devops -u 1001 -g 1001 -s /bin/bash devops - add user devops to the system. Set user description to "this is me", home directory to "/home/devops", user ID to 1001, primary group ID to 1001 and default login shell to bash.
passwd devops - set password for user devops
groupadd developers - add group with name developers
usermod -a -G developers devops - add user devops to group named developers

*Files:*
/etc/passwd - contains user accounts data
/etc/shadow - contains password hashes
/etc/groups - contains groups related data
/etc/sudoers - file for elevated privileges configuration

00:00 - Intro - Linux Users and Groups
00:16 - Primary groups vs secondary group
00:33 - Controlling access to a directory in linux - setting read/write/execute permissions
01:02 - Where are the user accounts stored - /etc/passwd file details
01:28 - Password hashes location
01:55 - What does password hashing do - put some salt in it
02:31 - Where are the linux groups stored?
02:51 - Adding a new linux user and group
03:00 - Sudo - elevating permissions in Linux
03:06 - /etc/sudoers file
Рекомендации по теме