Linux For Programmers #3 - Users and Groups

Tech With Tim · Beginner ·🛠️ AI Tools & Apps ·5y ago

Key Takeaways

The video tutorial covers users and groups in Linux, including creating new users, assigning users to groups, and managing permissions. Specific tools and commands such as `adduser`, `addgroup`, `usermod`, and `sudoers` file editing are demonstrated.

Full Transcript

[Music] hello everybody and welcome to another video in this linux for programmers tutorial series in this video we're going to be going through users and groups and talking about how we can assign specific users to groups and how we can change those users and groups permissions now before we get started just a quick word from load which is the sponsor of this video and this series lenode has data centers around the world with the same simple and consistent pricing regardless of location choose the data center nearest you and get started with lenode today a reminder that you can hit that link in the description and get a free 100 credit towards the node when signing up with a new account now one more reminder to please make sure that you are signed up for this right here so if you want to get access to the last five videos in this tutorial series again they will be live on youtube but if you want access them as soon as they are finished so as soon as i edit them and upload them they will be live here first so sign up at this page again link in the description and one last thing there is a guide that you can follow along with for this tutorial series this is from lenode it actually goes through pretty much everything that we're going to be talking about in this video so definitely helpful resource if you want to have a look at this again link in the description all right so let's go ahead and get started and talk about users and groups so right now we are actually signed in as the root user to our linux machine now the root user you can think of as the administrator or the super user but essentially this root user has access to everything so it can modify all files it can change everything it is just the most powerful user on a linux device so obviously if multiple people are going to be using our linux machine we don't want to give them root access we need to create a new user for them and in fact linux is actually a very unique operating system because multiple people can be signed into the same device at the same time so we can actually have multiple people using the exact same linux machine concurrently or in parallel so at the exact same time so that's interesting that's definitely not the same on something like mac or windows although i'm sure there's probably a way to do something like that but it's definitely not a native behavior anyway so now what i want to do is i want to show you first of all how we can create a new user how we can delete a new user and then how we can actually deal with groups change permissions of users and all of that so something to keep in mind is that the commands i'm going to show you are only going to work as the root user there is ways to get them to work as other users but at this point in time since root user is the only user that we have it's only going to work for the root user also because root user has permission to run all of this stuff so the first command that i want to show you is add user now this one is really straightforward all you do to add a new user is type add user followed by the name of the user and then you press enter and it's going to show us a bunch of prompts and i'll show you that in a second now another thing or another command that you can run is user add now i don't want to call this an older command but this is a lower level command where you're going to have to do a lot more manual stuff if you add a user this way so i would just stay away from this one you're welcome to use it or look it up if you want but add user is kind of the preferred method of adding a user now so we're going to say add user and then tim when i do this notice it's going to say adding user tim added new group tim added new user tim with grouptim created home directory uh for home slash tim and then copying files from this etc scale this is just like a skeleton of this user you don't really have to know what that is now it's prompting us for a password so we have to make the default password for this user so let's do that i'm just going to make it one two three four and there we go we now have added the password now it's going to ask us to fill in some details all of these details here are optional you don't need to fill them in but i would recommend that you at least put a name so i'm going to put timberseca that is my name i'm not going to put any numbers here and then it's going to ask you if this information is correct i'm going to say yes and there you go so that is all you need to make a new user now you have another user named tim now if you want to view all of the users on the system what you can do is you can type cat then slash etc pass wd we looked at cad extensively in the last video this is going to print out the contents of the etc pass wd file this file stores information about all of the users on the system you're going to notice when i run this that there is a lot more users than just tim and root but if you look at the very bottom you can see the tim user is here so you don't need to pay attention to all of these other users there's actually a lot of users on the system that are what we call system users and they're just there to make sure that applications and processes have the correct permission and everything runs properly anyways let's clear this we now have the tim user now i'm going to show you how we can sign in as the tim user this is really straightforward then we'll delete the tim user add the tim user to a group and talk about all these other things as well and by the way at this point in time i haven't explained groups yet don't worry we'll get to that in a minute so now if we want to log out of this so we can log in to our other user we can simply close the session just by pressing the x button or we can actually manually type the log out command so we'll just type log out like this by the way if it prompts you to type exit instead of log out just type exit then type logout afterwards i don't really know exactly why it's happening but sometimes that does happen when i type this command so anyways press log out it should just close the session for you this would work on mac as well and then we can open up putty again and start a new session but this time log in as our new user which i've called tim uh unexpectedly closed okay that's interesting let me just try this again i think i might have clicked on the wrong one let's try this there we go okay so this is working now all right so now i'm going to sign in as tim so login as tim it's going to ask me for my password i'll put that in and now notice that we log into the server successfully and all is good we signed in as this user so i'm just going to start by clearing the screen here and now i'm going to show you that this user does not have the same permissions that our sudo user has so actually first of all you can just see that our working directory is slash home slash tim this is our home directory for this user this we're going to store all of this users files and i'll just show you quickly that if i actually try to modify say the root users files i'm going to run into an issue so if i go cd dot dot and i cd again dot dot now you see we're in this folder i'm going to cd into the root folder and notice it says permission denied i cannot access or even read that folder because i do not have permissions to do so so this is the idea behind users obviously the tim user now has very limited permissions can only do stuff inside of its home folder so anyways that was how you create new user and sign in as that user i'm going to log out again log back in as the root and then we're going to talk about groups and modifying permissions for a specific user all right so i'm logged back in as the root user now i'll quickly show you the command to delete a user i'm not actually going to run it because well i don't want to delete the user but to delete a user you simply type dell user then the name of the user this will remove that user's group it will remove the user it will move the home folder this will do everything you need to do so dell user then the name just deletes that user so we just need to take a quick pause and think the other sponsor of this video which is algo expert algo expert is the best platform to use when preparing for your software engineering coding interviews they have over 115 coding interview practice questions with full detailed solutions and video walkthroughs for each question get started using algo expert today by hitting the link in the description and using the discount code tech with tim for a discount on the platform now the next thing i'll show you quickly is how to change a user's password so let's say we actually want to change one of the users that's not our own password we can type passwd so passwd then the name of the user whose password we want to change in this case tim it's going to ask us for the new password i'll just make it the same and we are good it updates our password now if we just type past wd notice this is actually going to prompt us to update our password so i could change our password if we want to but actually i guess i'm going to have to now that i've done this uh so let me just type in the same thing that i've used previously all right so now i have updated the password but that is how you change the password for a user or for yourself now when we had signed in as tim we could have typed past wd and we would have been able to change our own user's password with that command so something useful keep in mind all right so now i want to show you uh or talk to you sorry about groups so what is a group well a group is essentially a collection of users that all have the same permission so if we're talking about programmers here for example imagine you need to have access to all of the docker files on a system or something like that then you would probably be added to the docker group and there may be a few other developers that were added to the docker group as well and that way you guys all have the exact same permissions because you are part of that docker group you can do all of these things related to docker now maybe you are a special user you also need access to some specific files on the system you get added to some you know admin group or some pseudo group or whatever it is and now all of a sudden you have access to whatever that group's permissions are so that is the idea behind groups and now we need to talk about two things which is the fact that a user has a primary group and a secondary group so by default whenever you create a user and we did see this it's going to be assigned to a group that is unique and is named the same thing as the user so for example the root user has a primary group which is called root that tim user has a primary group which is called tim now the reason you have this differentiation between a primary group and a secondary group is the following first of all you only have one primary group you can have up to 15 secondary groups but every single time a file is created in linux it is said to be owned by the person's primary group that created it so in this case as user root our primary group is root so when we make a file it is said to be owned by root or you know belongs to the root group that means that anyone who is a part of that root group is able to access modify and just has permissions over that file so by having a unique primary group for each person each person is able to have their own individual files that no other user other than the root user or a pseudo user that has like a ton of permissions can access so hopefully that's clear but then secondary groups you can belong to multiple secondary groups which define what permissions you have in the operating system or just as a user in general now there can be files that are owned by secondary groups and what that means is that anyone in that group is able to access modify and do whatever with that file so i know this is kind of confusing to see because i'm just explaining it but just know that each user has their unique primary group at least they should have that and that group is typically named the exact same as their user and they can have up to 15 secondary groups and this will give them specific permissions allow them access to files and and things like that so that is the idea behind groups so we already know what the primary group is but now i'm going to show you how we can make secondary groups and assign users into them then it will show you how we can change the permissions for users and groups so first of all to add a group is really basic you can type add group and then simply the name of the group so in this case let's add say a python group for all of our python developers on this server so add group python see it says adding group python this is the id of this group so a thousand two now i will show you how to add a user into this group so you're gonna type the following this is user mod sorry not mond but mod hyphen a this stands for append which means append the following group to this user you're going to say user mod hyphen a hyphen g which says group then you're going to type the group name so in this case python and then the user that you want to add to this group which in this case is tim so user mod hyphen a again stands for append hyphen g stands for group and then the user name we're going to type that there we go all of a sudden tim has now been assigned to the user or to the python group so if we want to see what groups a user is assigned to what we can do is say groups and then type the name of the user in this case tim we see that tim belongs to the tim group and the python group if we want to see what groups a user belongs to or the current user belongs to sorry we just type groups and this will show us that we belong to the root group now i'll quickly show you how we can remove someone from a group as well so to remove someone we're going to type g pass and then wd hyphen d then the user name that we want to remove so in this case tim and then the group name which in this case is going to be python now i know this is kind of a strange command like you would think it would just be you know dell group or remove user from group or something but g pass wd hyphen d tim python hit enter and it says removing user tim from the group python anyways let's add tim back into that python group because i actually do want him in there and now what i'm going to show you how to do is actually set permissions for groups so that's kind of the basics on adding and removing groups but now it's like how do you actually make a group unique right what's the point of a group if it doesn't have its own permissions so all of the permissions uh for groups are stored in what's known as a pseudoers file now this pseudoers file is stored in a specific location on the operating system i'm actually not even going to show it to you but to modify this what you do is you type vi sudo so you do have to be a user that has sudo permissions to modify this file but you type vi sudo this will open the pseudoers file and then you can actually start modifying it so when i do that notice it opens up what's known as nano this is a text editor in linux i will show you how to use text editors in later videos in more detail but to navigate this you simply use the arrow keys and then you can see all the commands to save write out execute all of that in the bottom here so this is control and then whatever the key is anyways all we're going to do here is we're going to leave all these defaults the same you can modify specific things where the comments are here but this is where we're actually going to change or set permissions for groups and for users so if you want to give a specific user permissions and you don't really care about the group then what you do is you simply write the name of the user so in this case tim and then something in the following syntax now i'm not going to go through all of the syntax here because there's a lot in terms of how you give permissions but this is kind of the basics to add a permission to a user you say all and then equals and then you simply type the name of the command that you want to allow this user to run but you need to actually give the exact path to this command so let's say i want to allow my user tim to run the top command now what the top command does is simply list out all of the running processes on the machine and by default this user cannot run this command what you would do is you would type the path to this command so the path is actually slash usr slash bin and then slash top what this will do is say okay tim this user tim now has access to this command which is the top command so that's all you have to do if you want to add specific commands to a user you will separate these by commas so you can say you know the next command that you want to add after this one then comma so on and so forth so that's how you do it for a specific user it's going to be in this kind of format again you have to look this up if you want to do a lot of specific stuff but this is the sudoers file you can see it's in etc suitability.tmp now if we want to save this file so say that's all we want it to do what we can do is we can type control s and that's going to write 31 lines and then control x and there we go we actually saved that file now if you had just pressed control x it should have prompted you to actually save the file or to not save the file but anyways this should be good so now if i open up vsudo again you can see that this is saved and this tim permission is here so now let's just try something let's log out let's sign back in as tim and let's see if we can run this command now okay so i'm signed back in as tim now i'm going to run the top command i'm going to see if this works and it does we can now see all of the processes running on this machine i'm going to do a separate video on how all this works and what these processes are but anyways just want to show that for now so anyways let's quit that with ctrl c let's clear the screen now i'm going to log out log back in as root and then i'll be right back all right so we just saw that that did indeed work now what i'm going to do is add some more commands to allow the python group to execute so instead of adding these permissions on the user themselves i'm going to add it on the group and show you how that works so let's open up vi sudo again this opens the pseudoers file now what i'm going to do is rather than setting user privileges i'm going to set group privileges so you can see that the comments are kind of telling you where you should do this but it says allow members of group sudo to execute any command that's what this means what i'm going to do under here is i'm now going to make another kind of like group permission so i'm going to say the percent sign which stands for group then i am going to say python which is the group that i just created i'm going to say all which stands for all members and then equals and then list out any of the commands that i want to allow the python group to use so a great example of this would be to execute the python interpreter i don't know if you need permission to do that but that might be something that people in the python group would need to be able to do anyways i'm just going to add some kind of random commands in here you might not even really know what they do but we'll just allow members in the python group to execute the usr slash bin slash ls command also we will allow them to run the usr slash bin slash less command and then finally we'll allow them to run the usr slash bin slash apt command now you might be wondering where i'm getting all of these locations from you can kind of notice that most of them are just in bin for the standard commands but i am going to show you a command in one second that allows you to find the location of a command so it's a command that helps you find a command anyways i'm going to save this so control s and then control x and this will now give my python users permission to do this all right so now i'm going to show you that command that allows you to find the location of a command so let's say we wanted to know where the cat command was right and in fact i shouldn't have done that but anyways we want to know where that is we don't know the location all we do is we type which and then cat and this will tell us location to cat which is in user bin and cat so if you want to give permission to a specific command don't know where it is type which then the command name and it will tell you so anyways now that we have that permission let's sign out let's sign back in as tim and let's make sure that that is actually working all right so now we're signed back in as tim let's test out these commands so we will try the apt command looks like that one is working didn't say we don't have permission to use that so that's great the ls command well there's nothing in this folder so i guess that's just not working but we can use that in fact i think we could use that one before but anyways just was trying to show you how we could add commands then the less command let's see what this one does well it says we are missing a file name but i can do something like less and then slash etc group and notice that it tells me all of the groups on this system so anyways the idea of this is not to you know talk about any specific commands or anything is just to show you how you can actually give permission to specific users and two specific groups how you assign users to groups and the difference between a primary and secondary group anyways right now we're actually in something called vim i'm not going to talk about this right now i want to talk about it later but to get out of this what you need to type is escape and then colon and then wq when you type wq after the colon it closes that window so again colon wq that's what you need to type to get out of that window that always confused me a lot when i first started working on linux anyways that is kind of the basics on users and groups so i just realized i forgot to show you guys how to delete a group so i'm going to show you that quickly now before we end so to delete a group is super simple all you type is dell group and then the name of the group let's try to delete the python group and notice it says removing group python done and all is good so that is how you delete a group and this has been users and groups i hope this was helpful to you if it was make sure to leave a like and subscribe i will see you in the next linux for programmers video you

Original Description

In this Linux for programmers tutorial, I'll be going over users and groups, and talking about how we can assign specific users to groups and how we can change those users in groups permissions. Find out how to create a new user, how to delete a new user, and how we can deal with groups and change the permissions of users. 💰 Get a FREE $100 Credit on Linode: https://promo.linode.com/twt/ 📚 Get early access to later videos in the series: https://event.on24.com/wcc/r/2952121/381131E9ADEA3203AEC3413E5A212643/1958924?partnerref=partneryoutube 💻 AlgoExpert is the coding interview prep platform that I used to ace my Microsoft and Shopify interviews. Check it out and get a discount on the platform using the code "techwithtim" https://algoexpert.io/techwithtim 📗 Users and Groups in Linux (Guide): https://www.linode.com/docs/guides/linux-users-and-groups/ ⭐️ Timestamps ⭐️ 00:00 | Intro 02:14 | Creating users 04:59 | Signing in as other users 06:53 | Deleting users 07:37 | Changing users password 08:26 | Explaining groups 11:04 | Creating groups 11:36 | Assigning users to groups 12:33 | Removing users from groups 13:08 | Editing permissions 18:23 | Finding command locations 20:12 | Deleting groups 20:40 | Outro 📒 Playlist: https://www.youtube.com/watch?v=ebHX9c75H8I&list=PLzMcBGfZo4-nUIIMsz040W_X-03QH5c5h ◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️ 💰 Courses & Merch 💰 💻 The Fundamentals of Programming w/ Python: https://tech-with-tim.teachable.com/p/the-fundamentals-of-programming-with-python 👕 Merchandise: https://teespring.com/stores/tech-with-tim-merch-shop 🔗 Social Medias 🔗 📸 Instagram: https://www.instagram.com/tech_with_tim 📱 Twitter: https://twitter.com/TechWithTimm ⭐ Discord: https://discord.gg/twt 📝 LinkedIn: https://www.linkedin.com/in/tim-ruscica-82631b179/ 🌎 Website: https://techwithtim.net 📂 GitHub: https://github.com/techwithtim 🔊 Podcast: https://anchor.fm/tech-with-tim 🎬 My YouTube Gear 🎬 🎥 Main Camera (EOS Canon 90D): https://amzn.to
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Tech With Tim · Tech With Tim · 0 of 60

← Previous Next →
1 A* Path Finding Algorithm(Visualization)
A* Path Finding Algorithm(Visualization)
Tech With Tim
2 Python Programming Tutorial #1 - Variables and Data Types
Python Programming Tutorial #1 - Variables and Data Types
Tech With Tim
3 Python Programming Tutorial #2 - Basic Operators and Input
Python Programming Tutorial #2 - Basic Operators and Input
Tech With Tim
4 Python Programming Tutorial #3 - Conditions
Python Programming Tutorial #3 - Conditions
Tech With Tim
5 Python Programming Tutorial #4 - IF/ELIF/ELSE
Python Programming Tutorial #4 - IF/ELIF/ELSE
Tech With Tim
6 Python Programming Tutorial #5 - Chained Conditionals and Nested Statements
Python Programming Tutorial #5 - Chained Conditionals and Nested Statements
Tech With Tim
7 Python Programming Tutorial #6 - For Loops
Python Programming Tutorial #6 - For Loops
Tech With Tim
8 Python Programming Tutorial #7 - While Loops
Python Programming Tutorial #7 - While Loops
Tech With Tim
9 Python Programming Tutorial #8 - Lists and Tuples
Python Programming Tutorial #8 - Lists and Tuples
Tech With Tim
10 Python Programming Tutorial #9 - Iteration by Item (For Loops Continued...)
Python Programming Tutorial #9 - Iteration by Item (For Loops Continued...)
Tech With Tim
11 Python Programming Tutorial #10 - String Methods
Python Programming Tutorial #10 - String Methods
Tech With Tim
12 How to Overclock a NVIDIA GPU
How to Overclock a NVIDIA GPU
Tech With Tim
13 Python Programming Tutorial #11 - Slice Operator
Python Programming Tutorial #11 - Slice Operator
Tech With Tim
14 Python Programming Tutorial #12 - Functions
Python Programming Tutorial #12 - Functions
Tech With Tim
15 Python Programming Tutorial #13 - How to Read a Text File
Python Programming Tutorial #13 - How to Read a Text File
Tech With Tim
16 Python Programming Tutorial #14 - Writing to a Text File
Python Programming Tutorial #14 - Writing to a Text File
Tech With Tim
17 Python Programming Tutorial #15 - Using .count() and .find()
Python Programming Tutorial #15 - Using .count() and .find()
Tech With Tim
18 Python Programming Tutorial #16 - Introduction to Modular Programming
Python Programming Tutorial #16 - Introduction to Modular Programming
Tech With Tim
19 Python Programming Tutorial #17 - Optional Parameters
Python Programming Tutorial #17 - Optional Parameters
Tech With Tim
20 Python Programming Tutorial #18 - Try and Except (Python Error Handling)
Python Programming Tutorial #18 - Try and Except (Python Error Handling)
Tech With Tim
21 Python Programming Tutorial #19 - Global vs Local Variables
Python Programming Tutorial #19 - Global vs Local Variables
Tech With Tim
22 Python Programming Tutorial #20 - Classes and Objects
Python Programming Tutorial #20 - Classes and Objects
Tech With Tim
23 Cool VBS Script to Prank Your Friends!
Cool VBS Script to Prank Your Friends!
Tech With Tim
24 How to Overclock an AMD GPU
How to Overclock an AMD GPU
Tech With Tim
25 Best GPU'S For Mining Ethereum (2018)
Best GPU'S For Mining Ethereum (2018)
Tech With Tim
26 Recursion and Memoization Tutorial Python
Recursion and Memoization Tutorial Python
Tech With Tim
27 Ethereum Mining Rig - Hardware Guide
Ethereum Mining Rig - Hardware Guide
Tech With Tim
28 Pygame Tutorial #1 - Basic Movement and Key Presses
Pygame Tutorial #1 - Basic Movement and Key Presses
Tech With Tim
29 How to Install Pygame (Windows 8/10)
How to Install Pygame (Windows 8/10)
Tech With Tim
30 How to Trade Your Cryptocurrency (Bitcoin, Ethereum etc.) For Cash!
How to Trade Your Cryptocurrency (Bitcoin, Ethereum etc.) For Cash!
Tech With Tim
31 How to Mine Ethereum 2018 - WORKING (Super-Easy)
How to Mine Ethereum 2018 - WORKING (Super-Easy)
Tech With Tim
32 Microphone Comparison - $10 Mic vs $150 Mic (Blue Yeti USB)
Microphone Comparison - $10 Mic vs $150 Mic (Blue Yeti USB)
Tech With Tim
33 Pygame Tutorial #2 - Jumping and Boundaries
Pygame Tutorial #2 - Jumping and Boundaries
Tech With Tim
34 Pygame Tutorial #3 - Character Animation & Sprites
Pygame Tutorial #3 - Character Animation & Sprites
Tech With Tim
35 Pygame Tutorial #4 - Optimization & OOP
Pygame Tutorial #4 - Optimization & OOP
Tech With Tim
36 OBS Studio Tutorial - Best OBS Settings
OBS Studio Tutorial - Best OBS Settings
Tech With Tim
37 Linear Search Algorithm - Python Example and Code
Linear Search Algorithm - Python Example and Code
Tech With Tim
38 Make Any Mic Sound AMAZING! (WITH OBS)
Make Any Mic Sound AMAZING! (WITH OBS)
Tech With Tim
39 Binary Search Algorithm - Python Example & Code
Binary Search Algorithm - Python Example & Code
Tech With Tim
40 Pygame Tutorial #5 - Projectiles
Pygame Tutorial #5 - Projectiles
Tech With Tim
41 Pygame Game - Mini Golf
Pygame Game - Mini Golf
Tech With Tim
42 Pygame Tutorial - Projectile Motion (Part 1)
Pygame Tutorial - Projectile Motion (Part 1)
Tech With Tim
43 Pygame Tutorial - Projectile Motion (Part 2)
Pygame Tutorial - Projectile Motion (Part 2)
Tech With Tim
44 Pygame Tutorial #6 - Enemies
Pygame Tutorial #6 - Enemies
Tech With Tim
45 Pygame Tutorial #7 - Collision and Hit Boxes
Pygame Tutorial #7 - Collision and Hit Boxes
Tech With Tim
46 Pygame Tutorial #8 - Scoring and Health Bars
Pygame Tutorial #8 - Scoring and Health Bars
Tech With Tim
47 Cloud Mining vs. Hardware Mining - 2018
Cloud Mining vs. Hardware Mining - 2018
Tech With Tim
48 How to Install Pygame on Mac OSX (Fast-Simple)
How to Install Pygame on Mac OSX (Fast-Simple)
Tech With Tim
49 Pygame Tutorial #9 - Sound Effects, Music & More Collision
Pygame Tutorial #9 - Sound Effects, Music & More Collision
Tech With Tim
50 Pygame Tutorial #10 - Finishing Touches & Next Steps
Pygame Tutorial #10 - Finishing Touches & Next Steps
Tech With Tim
51 How to Fade Your Screen in Pygame [CODE IN DESCRIPTION]
How to Fade Your Screen in Pygame [CODE IN DESCRIPTION]
Tech With Tim
52 How to Create a Button in Pygame [CODE IN DESCRIPTION]
How to Create a Button in Pygame [CODE IN DESCRIPTION]
Tech With Tim
53 Pygame Side-Scroller Tutorial #1 - Scrolling Background/Character Movement
Pygame Side-Scroller Tutorial #1 - Scrolling Background/Character Movement
Tech With Tim
54 Pygame Side-Scroller Tutorial #2 - Random Object Generation
Pygame Side-Scroller Tutorial #2 - Random Object Generation
Tech With Tim
55 Pygame Side-Scroller Tutorial #3 - Collision
Pygame Side-Scroller Tutorial #3 - Collision
Tech With Tim
56 Pygame Side-Scroller Tutorial #4 - Scoring and End Screen
Pygame Side-Scroller Tutorial #4 - Scoring and End Screen
Tech With Tim
57 How to Create A Message Box in Python - Tkinter
How to Create A Message Box in Python - Tkinter
Tech With Tim
58 Is Ethereum Mining Still Profitable - Is It Worth It (April 2018)
Is Ethereum Mining Still Profitable - Is It Worth It (April 2018)
Tech With Tim
59 How to Run MAC OSX on a WINDOWS PC (Clover Boot-loader)
How to Run MAC OSX on a WINDOWS PC (Clover Boot-loader)
Tech With Tim
60 Programming Problem #1 - Alphabet Soup (Beginner/Novice)
Programming Problem #1 - Alphabet Soup (Beginner/Novice)
Tech With Tim

This video tutorial teaches the basics of users and groups in Linux, including how to create new users, assign users to groups, and manage permissions. Viewers will learn how to use specific tools and commands such as `adduser`, `addgroup`, and `sudoers` file editing.

Key Takeaways
  1. Run the `adduser` command to create a new user
  2. Use the `addgroup` command to create a new group
  3. Add a user to a group using the `usermod` command
  4. Display the groups a user belongs to using the `groups` command
  5. Manage group membership and permissions using the `gpasswd` command
  6. Edit the `sudoers` file to set permissions for groups and users
💡 The `sudoers` file is used to set permissions for groups and users, and can be edited using the `vi` or `vim` text editor.

Related Reads

📰
The Silent Costs of AI APIs Nobody Warns You About
Understand the hidden costs of AI APIs to avoid unexpected expenses and vendor lock-in
Dev.to · Shaw Sha
📰
The Only AI Tools a Small Business Actually Needs in 2026
Discover the essential AI tools for small businesses in 2026 to boost efficiency and customer engagement
Dev.to AI
📰
I Built an AI Life Planner the Month I Graduated and Switched to Linux Halfway Through
Learn how to build a personal AI life planner by following the author's journey, from initial development to switching to Linux halfway through, and apply these skills to your own projects
Dev.to · Hilal
📰
Your Second Brain Is a Graveyard. Your AI Has Amnesia. (Part 1)
Learn why your second brain and AI tools are failing you and how to address these issues
Medium · AI

Chapters (13)

| Intro
2:14 | Creating users
4:59 | Signing in as other users
6:53 | Deleting users
7:37 | Changing users password
8:26 | Explaining groups
11:04 | Creating groups
11:36 | Assigning users to groups
12:33 | Removing users from groups
13:08 | Editing permissions
18:23 | Finding command locations
20:12 | Deleting groups
20:40 | Outro
Up next
How AI Is Transforming Analytics in Tableau Cloud & Server
Salesforce Product Center
Watch →