Create Users and Set Password with shell script| Automated user creation From ServerGyan

preview_player
Показать описание
In this video, I am going to explain how to add users and set their password with help of shell script. This is one of the interview questions. How to convert an uppercase letter to lower case and use that in a variable to the user for user creation. How to take input from a file to create a user and set a password for all users using a shell script.
Рекомендации по теме
Комментарии
Автор

Nice tutorial. Thanks for making video and teaching it so well. Its really helped a lot

praveenshahapurmath
Автор

many thanks for that it possible that every user`s password immediately expires....meaning if the user is logging in...he must change his password...many thanks in advance for your good work. best regards

cil
Автор

Brother I have creted a shell script to telnet the ip and port status but after one telnet it requires enter key then only next telnet cammand works I there any alternative so that without enter key it executes the next telnet cammand

sushiltiwari
Автор

May I know if I want to the script for user input the username uid, gid and groupname and comment?

SHARK
Автор

Hi, with debian, I can't use this command : echo $password | passwd --stdin $username" I get a error with the --stdin argument. Instead, I use this command : echo "$username:$password" | chpasswd

regismailleux
Автор

i followed the same step but i am getting an error. I using ubuntu. Please help !
passwd unrecognized option '--stdin' usage passwd options login

KrishnaRac
Автор

what short cut are you using to come out of the data enetry page

mahakshrimal
Автор

what is the purpose of putting stdin
i think that the code will work even without it

AK-rdlu
Автор


so had to reset the password for the user manually.

Shagssfrag
Автор

Loki sir, i have one question.
Why we are using below symbol
#
!
?
$
|

paramesh
Автор

hello dear, i need un and pass auto making for my own linux server . my server is a subscribtion server like not32 . may i ask you help me more/?

ahmadhojjatikoohkamari
Автор

Hi, nice vide except that error in script. You have to wait all the way along to the end where you found that error.
Next is not so much secure password, this oneliner shold be much better.
password=$(openssl rand -base64 16 | colrm 17)
I leave up to you how to pair user with randomly generated passwords.

Keep it up and maybe edit this video (add some notification that this error is solved in the end)

Spuny
Автор

Hello Sir,
I am not able to create users with password .
Am right??
please help me sir

VirendraYadav-muye
Автор

Nice tutorial. What if the users' file had two names for each user say:
"jone stones"
"mark finley"
"jay combs". etc

code_fred
Автор

nice video I need to add the user in sudoer files how do I mention in scripts file

ayubraza
Автор

Thanks for the great work.
The script still has the following things to take care.


"userfile" variable is not used any where after it is created at first instance.

pravanjanhota
Автор

Anyone say that after typing first command how we get that insert option to type names

mahithakoduru
Автор

How to create freeipa server users script plz make video

GTECHGorakh
Автор

Can anyone help me? Plz
script one take user input to set up an account
script two let user change password
Change the password requirement to take 5 characters (I know not secure) This is an exercise
Make the password change every 45 days
expire in 1 year
See if you can add this user change password to gnome front end.

ghazwankareem
Автор

can you post more such kind of scripts

prasanthseepana
welcome to shbcf.ru