LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 01-22-2005, 11:40 AM   #1
ldp
Member
 
Registered: Apr 2004
Location: Belgium Antwerpen
Distribution: slackware - knoppix
Posts: 141

Rep: Reputation: 17
set logon password without useradd?


Hi,

I'm writing some script to automagically create a new useraccount.
I want the script to run with two parameters, the username and his password. Now to create the user account is no problem at all but to set the password without the prompt asking it, is that possible?
The goal is that the script can run without any interactive user input. Is it possible to have the script provide the input for the passwd?

thanks.
Lieven
 
Old 01-22-2005, 01:03 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You could use an expect script with passwd.
 
Old 01-22-2005, 07:12 PM   #3
ldp
Member
 
Registered: Apr 2004
Location: Belgium Antwerpen
Distribution: slackware - knoppix
Posts: 141

Original Poster
Rep: Reputation: 17
What is an expect script? I assume it's some kind of script that sends text to the passwd command? But can you give away a hint? I tried with input redirection like passwd < pwdfile < pwdfile but ofcourse that didn't work. :-)

Ok.. sry, I should have checked it immediatly. expect seems to be the command that I was looking for.

thanks.

Last edited by ldp; 01-23-2005 at 04:41 AM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
useradd without shadow password twallstr Linux - Software 1 09-08-2005 02:14 PM
Password Problems With useradd Jude Lucien Debian 4 08-18-2005 10:44 AM
Logon (telnet) to RedHat ES 3.0 bypassing password amutrl Linux - Newbie 2 05-18-2005 06:12 AM
logon and password recovery Ron Moroney Linux - Newbie 5 04-08-2005 01:15 PM
Help with password logon window wardialer Linux - Newbie 3 04-08-2005 02:24 AM


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

Main Menu
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