Managing Linux Users and Groups

  Рет қаралды 8,297

Linux Training Academy

Linux Training Academy

Күн бұрын

Read the full blog post and grab your cheat sheet here:
www.linuxtrain...
Video Transcript:
Each account consists of a username and a unique number called the UID which is short for user ID. Also, each account has a default group to which it belongs, some comments associated with that account, a shell to start when the user logs into the system, and a home directory. All of this information is stored in the /etc/passwd file. Note that /etc/passwd
is spelled "passwd."
Historically, encrypted password information was also stored in the /etc/passwd file. However, the /etc/passwd file is actually readable by anyone on the system, so storing password information, even though it's encrypted, is actually a security risk. So now, by default, the encrypted password information is stored in /etc/shadow. That file is only readable by the superuser or the root account on the system.
Managing users on a Linux system is fairly straightforward. If you want to create an account, use the useradd command and to delete accounts, use the userdel command. To modify existing accounts, just use the usermod command. These commands listed on your screen are the low-level Linux commands and they're available on all the Linux distributions. However, some distros provide their own account creation tools that you can use if you so choose.
Just like the /etc/passwd file contains account information, the /etc/group file contains group information. To create a group use the groupadd command. The groupdel command will delete a group. To modify a group, use the groupmod command.
To see what groups an account is in, use the groups command. If you specify an account after the groups command, it will show all the group memberships for that specified account. If you happen to execute the groups command without any arguments, it displays the groups that the current user is in.
If you want to switch to another account, use the su command, which stands for switch user. To verify what account you're currently using, simply run the whoami command and it will return the account name.
The sudo command is used to allow one user to run commands as another user. This is most commonly used to allow a normal user to execute a program as the superuser, so you can think of sudo as "superuser do." To start a shell as another user, run "sudo -s" or you can also run "sudo su".
By the way, the file that stores the sudo configuration is /etc/sudoers. To modify the sudoers file, use the visudo command. It has syntax checking built in so you don't accidentally break the sudo configuration.
If you found this video helpful then I know you're going to learn so much more in my Learn Linux in 5 Days course available at courses.linuxt.... In it, you'll learn exactly what you need to know about the Linux operating system in order to become a proficient and professional user in a very short period of time.
In the course, you'll start at the very beginning by choosing a Linux distribution and installing it. From there, you'll learn the most important Linux concepts and commands, plus you'll be guided step-by-step through several practical and real-world examples.
By the way, this course also comes with a 30-day money-back guarantee which means you have everything to gain and absolutely nothing to lose by trying it out.
So, if you can spare just a few minutes a day and want to learn the ins and outs of the Linux operating system, join me and the other students in this course today. I look forward to seeing you in the course!
courses.linuxt...

Пікірлер
Linux Sysadmin Basics -- User Account Management
15:39
tutoriaLinux
Рет қаралды 177 М.
Linux Crash Course -  Managing Users
32:59
Learn Linux TV
Рет қаралды 111 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Users, Groups and Permissions in Linux
37:00
Eli the Computer Guy
Рет қаралды 545 М.
Mastering Linux Man Pages - A Definitive Guide
39:03
Linux Training Academy
Рет қаралды 68 М.
60 Linux Commands you NEED to know (in 10 minutes)
10:50
NetworkChuck
Рет қаралды 1,7 МЛН
Tmux Tutorial for Beginners
11:58
Linux Training Academy
Рет қаралды 24 М.
Linux System Administration Crash Course
25:59
Linux Training Academy
Рет қаралды 322 М.
Linux Find Command Tutorial
11:15
Linux Training Academy
Рет қаралды 18 М.
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4,2 МЛН
Learning the Linux File System
25:09
Joe Collins (EzeeLinux)
Рет қаралды 1,2 МЛН
Linux tar Command Tutorial with Examples: .tar, .tar.gz, .tgz
14:21
Linux Training Academy
Рет қаралды 27 М.