How to Create Multiple Users and Set Password for each User in Linux

preview_player
Показать описание
This short video is aim at showing you how to create multiple users at the same time and set a password for each one of them.

Commands:
touch /opt/user add
:w !sudo tee %
cat /opt/user add
for i in `cat /opt/user add` ; do sudo useradd $i ; done
for i in `cat /opt/useradd` ; do sudo id $1 ; done
for i in `cat /opt/user add` ; do sudo passwd $i ; done

Chapters:
0:00 Intro
0:23 Create multiple users
1:41 Set passwords for multiple user accounts
2:22 End screen

What you'll learn:
1. Create Multiple Users
a. How to create multiple users at the same time
b. How to create the /opt/user add
c. How to used vim to edit and add the names of the users we want to add
d. How to write down or save the list of users in Vim editor
e. How to view the /opt/user add directory
f. How to run 'for loop' to create the users
g. How to view the list of newly added users and respective IDs
2. Set Passwords for Multiple User Accounts
a. How To set different passwords to each user
b. How to switch users using the su command
3. How to Add and Remove Users on Ubuntu

Song: MBB - Good Vibes (Vlog No Copyright Music)
Music provided by Vlog No Copyright Music.

#computereverywhere #howtocreate #multiple #howtoset #users #password #linux
Рекомендации по теме
Комментарии
Автор

Hi i need help. I have to do this for my assignment. "Compose a table listing username and password for at least 5 new users to your system. Use different 'difficult' levels for their passwords. Save the table in a file". I am confused that is your video related to my assignment or not.

bootsandballu
Автор

Why did you use vim instead of vi? is it because you can only save and make changes to this file with that (:w !sudo tee %) command so it would change to vim anyways ? How do you know when to use which one?

JlNXED
Автор

What if we have 100 users, do we need to enter password 100 times manually?

surabhilal
Автор

I have 50 users. Is it possible to give everyone a password???

farhadnamdariyan
Автор

Good content but Way too fast for one to follow!!!!

modaafrique