LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-21-2005, 06:48 PM   #1
newuser455
Member
 
Registered: May 2004
Location: Texas
Posts: 277

Rep: Reputation: 30
Expect.pm /bin/su incorrect password


I am trying to run a script that creates Unix users through a web browser. It is called autouseradd, and uses Expect.pm and IO. Whenever it is run I get the error:

user test3 added.Setting password. This may take a while. Do NOT click 'Stop'.
Password:
/bin/su: incorrect password

I know that this is not the script generating this message because "/bin/su: incorrect password" is nowhere in the script. Do I need to specify the root password somewhere in Expect.pm?

Any help would be appreciated.
 
Old 01-21-2005, 10:11 PM   #2
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
It seems you are simply not passing the required passwd(s) to the expect script. You do not need to put this in the expect script necessarily... for example you could pass it as a variable when you initiate the script.
Check here for examples.
I also suggest you pick up the exploring expect book (from O'Reilly I think... there's only one).

cheers
 
Old 01-21-2005, 10:55 PM   #3
newuser455
Member
 
Registered: May 2004
Location: Texas
Posts: 277

Original Poster
Rep: Reputation: 30
Wait, wait, so you are saying that I am going to need to specify root password in the script?
 
Old 02-05-2005, 10:12 PM   #4
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
...unless you run it as root. You do have `su` in your script correct?

Can you post the script?
 
Old 02-06-2005, 04:22 PM   #5
newuser455
Member
 
Registered: May 2004
Location: Texas
Posts: 277

Original Poster
Rep: Reputation: 30
Nevermind this post.... I had someone write a script to do this and am no longer having this problem. Thanks anyway
 
Old 02-06-2005, 04:23 PM   #6
newuser455
Member
 
Registered: May 2004
Location: Texas
Posts: 277

Original Poster
Rep: Reputation: 30
Nevermind this post.... I had someone write a script to do this and am no longer having this problem. Thanks anyway This script had other problems too.
 
  


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
Need help using expect to set password Arodef Linux - General 2 03-03-2005 07:30 PM
login incorrect before password ourlinuxid Linux - Security 4 01-22-2005 01:35 AM
Expect.pm /bin/su incorrect password newuser455 Linux - Software 0 01-21-2005 06:38 PM
incorrect password (can single, but can't su) david_reno Linux - Software 2 06-19-2003 09:42 PM
incorrect password when logging in as su - DMB Linux - General 3 07-09-2002 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:50 AM.

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
Open Source Consulting | Domain Registration