LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 05-06-2004, 02:23 PM   #1
liguorir
Member
 
Registered: May 2003
Posts: 256

Rep: Reputation: 30
Question 'passwd utility' - can't pass arguments - Please Help


How can i pass 'password' arguments to the passwd utility.

So rather than be prompted, I want to get through passwd with one sweep.

I.e. passwd -? [ password] username

Please advise.

Last edited by liguorir; 05-06-2004 at 10:07 PM.
 
Old 05-06-2004, 03:19 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
http://man.linuxquestions.org/index....ction=0&type=2

Nothing in the man pages, its not built with such function to my knowledge. If you have an existing user though, use usermod which doesn't work like passwd and you can update the password with the -p option, etc.

http://man.linuxquestions.org/index....ction=0&type=2

Remember, man is your friend..
 
Old 05-06-2004, 09:44 PM   #3
liguorir
Member
 
Registered: May 2003
Posts: 256

Original Poster
Rep: Reputation: 30
Question passwd arguments - no dice

So 'usermod -p' does work for linux, however the '-p' parameter is not provided on a SunOS box v. 8.

There are two possible work arounds that I see.

1) How can I 'crypt' the password myself? ( then I can simply update /etc/shadow ).

2) How can I call the password utility, while passing the password and confirm password arguments? Let me see if I can explain this better... If you run 'passwd', you recieve prompts for data. I'm using Tcl/Tk for my app. How can I pass $value and $confirm_value to the 'passwd' utility and through the prompts while using tclsh?

Please advise.
 
Old 05-20-2004, 10:41 PM   #4
liguorir
Member
 
Registered: May 2003
Posts: 256

Original Poster
Rep: Reputation: 30
Question Cant be done.

I've determined it cannot be done on SunOS - Solaris 8. 'usermod' does not have the -p option. I had to right a c utility, with the 'crypt' function.
 
  


Reply



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
"multiboot utility" and "dell utility partition" on dell i5150 xround Linux - Laptop and Netbook 5 04-21-2005 09:19 AM
Ping utility gr33ndata Programming 3 02-17-2005 06:01 PM
rm utility seanatis Linux - General 1 09-05-2004 03:56 PM
very useful utility, everyone should see exodist Linux - Software 3 08-27-2003 03:29 AM
Help with a linux utility Ripper951 Linux - General 6 01-12-2003 01:00 PM

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

All times are GMT -5. The time now is 08:07 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
Open Source Consulting | Domain Registration