LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 02-08-2007, 01:28 AM   #1
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Rep: Reputation: 15
How to set password when creating user accounts


I wish to specify password in plain text when using the useradd or adduser command. But the manual says the argument following -p should be an encrypted string.

How do I specify password in plain text when creating new user accounts?

This is needed when I create user accounts in a web application.

Thanks!
 
Old 02-08-2007, 01:37 AM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
You could pass the password to the passwd command after creating the user account. If that's not practical, have a look at the man page for newusers, if it's installed on your system. It may let you do what you want since it can parse a file of username/clear text passwords.
 
Old 02-08-2007, 01:50 AM   #3
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Original Poster
Rep: Reputation: 15
Thanks Gilead. No, newuser is not installed in my system.

If I pass password to passwd, would it require me to re-type the password?

But the whole process is supposed to be automatic. I created a web interface where username and password is entered, and this should call the system runtime and execute the useradd and related commands.

So how can I automate the process?

Thanks again!
 
Old 02-08-2007, 03:32 AM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
I haven't tried it with the same sort of setup that you have, but a script using expect may be able to get the password and confirmation done for you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set default Desktop environment while creating user accounts?? mayank_a Linux - Software 5 10-05-2005 07:26 AM
trouble creating user accounts krsnachaitanya Linux - Networking 2 02-12-2005 11:01 AM
Creating User Accounts Winux Linux - Newbie 6 04-01-2003 06:35 AM
Creating user accounts Ricardo Linux - Newbie 3 05-19-2002 04:24 AM
some accounts don't have sound?? / creating desktop for user Cor_Tauri Linux - Newbie 1 07-06-2001 01:29 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration