OpenSolaris Solaris Forum  
     

Left Nav FAQ Members List Default Password Members List Linux Commands Search Today's Posts Mark Forums Read Right Nav

Left Container Right Container
 

Go Back   OpenSolaris Solaris Forum Solaris General

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-29-2010, 05:52 PM
JDK JDK is offline
Junior Member
 
Join Date: Mar 2010
Posts: 6
Default Shell script for password prompt

Hi

I am using Solaris9 and trying to change password of a user with command:

passwd userid

i want password to be given from text file or command line so that password is not prompted on the command line. Is there any way to do this?
I guess i am able to force the carriage return to be entered while entering the password from command line.
This is what I am doing:

passwd userid << EOF
newpassword
newpassword
EOF


But after this, it still gives me New Password prompt. Any help will be appreciated.

Last edited by JDK; 04-29-2010 at 06:46 PM.
Reply With Quote
Sponsored Links

  #2 (permalink)  
Old 05-01-2010, 12:44 PM
Unregistered
Guest
 
Posts: n/a
Default

I think that you also need to specify a after you enter the password for 1st time

passwd userid << EOF
newpassword << EOF
newpassword
EOF
Reply With Quote
  #3 (permalink)  
Old 05-01-2010, 12:45 PM
Unregistered
Guest
 
Posts: n/a
Default

I mean
specify a EOF
Reply With Quote
  #4 (permalink)  
Old 11-24-2011, 03:00 PM
Unregistered
Guest
 
Posts: n/a
Default

I have the sam issue, did any one find the solution, can they share the esact script please..
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:29 AM.


Powered by vBulletin. Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.