LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Want to create 25 Users and forcing the users to change passwords (https://www.linuxquestions.org/questions/linux-newbie-8/want-to-create-25-users-and-forcing-the-users-to-change-passwords-4175522587/)

James0806 10-18-2014 07:55 PM

Want to create 25 Users and forcing the users to change passwords
 
for i in 1 2 3 4 5; do useradd user$i; echo user$i | passwd --stdin user$i; done



I found this while googling i just want to create some users and allowing them to change their passwords after their first login using script

TB0ne 10-18-2014 08:38 PM

Quote:

Originally Posted by James0806 (Post 5255809)
for i in 1 2 3 4 5; do useradd user$i; echo user$i | passwd --stdin user$i; done

I found this while googling i just want to create some users and allowing them to change their passwords after their first login using script

Ok...and your question/problem is what? Or is this another homework question?

Read the man page on the useradd command, read up on how to set a default on password expiration, and (again) read one of the MANY bash scripting tutorials.

James0806 10-19-2014 11:47 AM

Not the answer i was expecting

TB0ne 10-19-2014 11:56 AM

Quote:

Originally Posted by James0806 (Post 5256085)
Not the answer i was expecting

If you were expecting a handout, then no. If you wanted guidance and advice/hints on how to solve the problem ON YOUR OWN, you got it. Show effort of your own, and perhaps explain what you're confused about, and you'll get help. Posting a snippet of a script and telling people what you expect isn't doing that.

You have the tools to do what you're after; whether you actually USE those tools or not isn't something we can help you with. Look at your other threads, where you ask homework questions:
http://www.linuxquestions.org/questi...ud-4175515055/
http://www.linuxquestions.org/questi...rs-4175515947/
http://www.linuxquestions.org/questi...on-4175510578/
http://www.linuxquestions.org/questi...ge-4175513826/
http://www.linuxquestions.org/questi...th-4175512351/


All times are GMT -5. The time now is 08:13 PM.