Unix/Linux Go Back    


Security Discuss UNIX and Linux computer and network security, cyber security, cyber attacks, IT security, and more.

Mass account creation

Security


Tags
aix, password, solaris

Closed    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 12-23-2014
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
Join Date: Jun 2007
Last Activity: 24 March 2017, 12:41 PM EDT
Location: Lancashire, UK
Posts: 3,052
Thanks: 1,280
Thanked 583 Times in 528 Posts
A partial hit with ssh -t -t except I think it empties the input buffer when prompting for the password a second time, which is a shame. The best I've got to is with a here document on the command line like this:-
Code:
# ssh -t -t localhost passwd TESTUSER <<-EOSSH
> Qwerty99!
> Qwerty99!
> EOSSH
TESTUSER's New password: 
Enter the new password again:

3004-781 Password read timed out.
3004-709 Error changing password for "TESTUSER".
Connection to localhost closed.
#

How annoying is that, unless anyone can spot that I've missed something. I've tried piping another echo Qwerty99! into the ssh and without the - for the -EOSSH, but all getting the same result.

Bah! Linux Am I just hoping for too much? I fancy that some manual work and an edit of /etc/security/passwd or /etc/shadow is looming.



Robin

Last edited by rbatte1; 12-23-2014 at 10:49 AM.. Reason: Corrected spleling for :confused: smiley
Sponsored Links
    #9  
Old Unix and Linux 12-23-2014
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 24 March 2017, 11:24 AM EDT
Location: NM
Posts: 10,986
Thanks: 504
Thanked 1,030 Times in 957 Posts
This entire project used to kill me timewise. Scripting was the only usable solution. I have had to add a gaggle of new users onto as many as 27 Solaris servers.

I ran into this, then someone else suggested changepass, it is a port for Solaris of linux chpasswd. changepass manpage - Staf Wagemakers

It has worked fine for me.
The Following User Says Thank You to jim mcnamara For This Useful Post:
rbatte1 (12-29-2014)
Sponsored Links
    #10  
Old Unix and Linux 12-29-2014
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
Join Date: Jun 2007
Last Activity: 24 March 2017, 12:41 PM EDT
Location: Lancashire, UK
Posts: 3,052
Thanks: 1,280
Thanked 583 Times in 528 Posts
I will give it a try. Still stuck for AIX, but then if I have to brute force edit /etc/security/passwd to copy the encrypted password in, so be it.



Regards,
Robin
    #11  
Old Unix and Linux 01-06-2015
bitlord bitlord is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 20 May 2016, 11:47 AM EDT
Posts: 339
Thanks: 12
Thanked 44 Times in 40 Posts
rgatte1,
If your still working on this try the following as root.

Code:
echo password | passwd username --stdin

This only works with Linux, I tested it on SLES and it worked. I see you have solaris and AIX tags on this post. I also tested this on Solaris 10 server and it didn't work. You will have to use expect, or use something like sed to do a find and replace for the effected line in /etc/shadow.

I hope this helps you out.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Account creation Sudo enabled vilves UNIX for Dummies Questions & Answers 1 06-06-2006 10:35 AM
how to find creation time of an account? sukumar UNIX for Advanced & Expert Users 1 05-31-2006 10:31 AM
Account creation date Hayez UNIX for Dummies Questions & Answers 2 08-02-2005 02:44 AM
Mass directory creation? AeroEngy UNIX for Dummies Questions & Answers 6 07-21-2005 12:57 PM
Account creation trouble seaghan Forum Support Area for Unregistered Users & Account Problems 2 04-22-2005 12:15 PM



All times are GMT -4. The time now is 03:59 PM.