The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
setting username and password for ftp div UNIX for Advanced & Expert Users 1 12-08-2006 08:09 AM
Setting default password for user in SCO gseyforth SCO 8 09-30-2005 08:54 AM
Who can help me how to add user without 'useradd' command foong UNIX for Dummies Questions & Answers 3 08-06-2003 10:02 PM
Want to create new users without using "useradd" command and user Interaction. syedifti UNIX for Dummies Questions & Answers 2 10-09-2001 02:26 AM
Help in setting up password without Interaction. syedifti UNIX for Dummies Questions & Answers 3 10-06-2001 01:11 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-19-2007
Registered User
 

Join Date: Feb 2007
Location: india,mumbai
Posts: 82
setting password for user using useradd?

hi all
i am writing a script to create user and group from the input given to script
for eg. script needs to values
1. mode - 1 or 2
2. id - if mode is 1 then id should be 2 char like x1 / v1 / v2
if mode is 2 then id should be 1 char like x / v / e
from these to values group is generated as : abcxr / abcvr
and user name as : abconlx1 / abconlv2 / abconle

i have written a script that will run for sun / hp / aix but the only problem is that setting a password for the user now i am asking user to change password once the user is created with passwd <user-name> command.

is there any way that i can set default password ??
Reply With Quote
Forum Sponsor
  #2  
Old 10-21-2007
Supporter
 

Join Date: Jul 2006
Posts: 156
On newer versions of AIX (I believe 4.3 and up), you should be able to use the chpasswd command. On HP systems (at least 10.20 & up), you should be able to use
Code:
/usr/sam/lbin/usermod.sam -p <passwordhash>
. If you don't want the new password to expire, put a comma after the password hash. This is related to how HP-UX stores the password aging information.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0