HomeНаука и техникаRelated VideosMore From: Firebox Training

Linux Training - HOW TO Create Users and Groups in Linux

285 ratings | 66346 views
This Linux video tutorial from https://www.fireboxtraining.com/linux demonstrates how to create users and groups on a Linux server. We will take a closer look at the /etc/passwd and /etc/group files so you better understand the relationship between users and groups.
Html code for embedding videos on your blog
Text Comments (28)
iGarrettt (7 days ago)
I like how you show people to RTFM
Dirck (1 month ago)
how do you move the group to a specific directory?
Nassirou Aboubakar (1 month ago)
Excellent tutorial. Thank you!
Jamal Khader (2 months ago)
Good job! thx
Shahir Ansari (6 months ago)
Evan Root (10 months ago)
Pro tip to the newbs: useradd will always work, but adduser is different in Debian based systems like Ubuntu. Adduser is a command line wizard that makes the process very intuitive. On all other linux distros like Redhat, Centos, SuSE etc, adduser is just a dumb link to useradd, meaning they are redundant.
Ade Makinde (1 year ago)
Great video
prachiti pimple (1 year ago)
I am getting problem while adding a new user and new group.its shows "command not found" will you please help me to slove this problem
Anthony Le (1 year ago)
How come when I added my user (tle) to my newly created group (regusers:x:1003:). It didn't change my user group when running ls-l? It shows "-rw-rw-r--. 1 tle 1000 0 Jan 18 10:22 myfile". Shouldn't it be 1003 instead of 1000? I'm on Fedora if that makes any difference.
Evan Root (10 months ago)
These commands don't change the ownership of already existing files. It appears that you have files in the 1000 group but you need to `chown` (change ownership) to user/ tle and group/ 1003. somethin like `chwon tle:1003 myfile`. Look for chown examples to better get the variables.
Adrian (2 years ago)
Great, concise tutorial. Thanks!
Pickles in the making (2 years ago)
thank you :)
paralokesh gaddam (2 years ago)
I am not able to visit the given above link and the homepage too. Could you, please do the needful.
ᗩlвαη (2 years ago)
Clear and Very helpful..Thanks.. I have a query. is it possible to create a user having access one location/directory only in Linux. Kindly let me know. Tx
HDWhirlwind (2 years ago)
How do you use that VI text editor how do i exit it?
HDWhirlwind (2 years ago)
+Tamas Andrei Thanks dude!
Tamas Andrei (2 years ago)
hit ESC then write ":wq"
Erik Harper (3 years ago)
Thank you, thank you, THANK YOU!!! In 10 minutes you helped me to clarify my questions about Vim, /etc/passwd/, creating users, user memberships and something else. You. Are. Amazing!
Chef Bundles (3 years ago)
This was very helpful towards understanding how to navigate the file system.  Thanks again!
Karl Beigan (3 years ago)
I'm new to linux and this is the best by far intro to Users and Groups.
thtguy ish (3 years ago)
im new to linux how do i do this: create a group which is assigned to all new users by def (not primary group) and create a group that would be in the home dir of any new user
thtguy ish (3 years ago)
+Firebox Training thanks for your response but this was the actual scenarios: Create a group named migration that is assigned to all new user accounts (but DO NOT make it the primary group) 2. Configure the system to create a directory named migration in the home directory of any new user account. 3. Create the following 3 accounts: Username UID Full Name Home Directory Password pilot1 1010 Pilot1 SUSE /export/home/pilot1 novell pilot2 1011 Pilot2 SUSE /export/home/pilot2 novell pilot3 1012 Pilot3 SUSE /export/home/pilot3 novell 4. Make sure all pilot user accounts are assigned to the default groups plus the group migration. 5. Verify that all pilot users have a subdirectory migration in their home directories (must have been added upon new user creation). Create new groups named sales and accounting. 2. Make sure that every new user created from here forward has a sales directory in their home directory, created automatically when the user is generated 3. Configure the group sales to be the PRIMARY group for all new users created henceforth. That is, when a new user is created, make sales the primary group 4. Create 2 users named shawn and cindy (full name: Shawn Smith and Cindy Smith). Give them passwords of novell. Make their home directories in /home. Make their user accounts such that when they log in for the first time, they must change their password
Firebox Training (3 years ago)
For your first question: you would first create the group. They you create a loop that cycles through all of the user names that already exist, then issue the usermod command on the user to add it to the group. Example: groupadd foo   for username in `cut -d: -f1 /etc/passwd` do usermod -a -G foo ${username} done The code above creates a new group called 'foo', then loops through all the users in /etc/passwd, adding them each to the new group. Note that we're using backticks for command substitution, NOT single quotes! I'm not sure what the second part of your question is asking. Could you please clarify that part?
Jay Marley (3 years ago)
good video clear and precise
vamsi omega (4 years ago)
thank you its very helpful..... 
Lewis Loflin (4 years ago)
Thank you Julie.
navamoore (5 years ago)
Great video thank you
Julie Johnson (5 years ago)
Glad you enjoyed it! What other types of video demos would you like to see?

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.