Mass account creation


 
Thread Tools Search this Thread
Special Forums Cybersecurity Mass account creation
# 8  
Old 12-23-2014
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! Smilie 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 11:49 AM.. Reason: Corrected spleling for :confused: smiley
# 9  
Old 12-23-2014
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.
This User Gave Thanks to jim mcnamara For This Post:
# 10  
Old 12-29-2014
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 01-06-2015
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script for user account Creation

Hi Folks, I had a request to create the user request. Between, I just write a script a create, Update Geos, and update the password. My script as below: The error message, what I am getting is all the users are updated with the same Goes value.. #!/bin/bash for i in `cat users.txt`;do... (2 Replies)
Discussion started by: gsiva
2 Replies

2. How to Post in the The UNIX and Linux Forums

Simultaneously try to execute commands after connecting to remote account to one account

I have made password less connection to my remote account. and i tried to execute commands at a time. but i am unable to execute the commands. ssh $ACCOUNT_DETAILS@$HOST_DETAILS cd ~/JEE/*/logs/ (1 Reply)
Discussion started by: kishored005
1 Replies

3. AIX

VI questions : mass changes, mass delete and external insert

Is it possible in VI to do a global change but take the search patterns and the replacement patterns from an external file ? I have cases where I can have 100,200 or 300+ global changes to do. All the new records are inside a file and I must VI a work file to change all of them. Also, can... (1 Reply)
Discussion started by: Browser_ice
1 Replies

4. UNIX for Dummies Questions & Answers

Account creation Sudo enabled

Hi, how to create account with the following be cron enabled only accessible via sudo (1 Reply)
Discussion started by: vilves
1 Replies

5. UNIX for Advanced & Expert Users

how to find creation time of an account?

Hi all, I want to know the time when a perticular user is created, atleat in which year it is created. Could any one help me in this issue. Thanks in advance. Regards, M.Sukumar (1 Reply)
Discussion started by: sukumar
1 Replies

6. UNIX for Dummies Questions & Answers

user account creation date

hi, i tried searching the forum for a thread about this, but came up empty handed. is there a way to pull a list of all user accounts, with the associated creation date? thanks in advance! (2 Replies)
Discussion started by: lilweezy
2 Replies

7. UNIX for Dummies Questions & Answers

Account creation date

Hi All, Is there a simple and obvious way to see when an account was created.An account has come to my attention in /etc/passwd and a last on it shows having never logged in and the home directory looks to be a couple of years old. Just wondering if I'm over looking anything obvious. ... (2 Replies)
Discussion started by: Hayez
2 Replies

8. UNIX for Dummies Questions & Answers

Mass directory creation?

I have a couple thousand data files that all have to have there own directory named exactly the same as the file name. Then the file needs to be moved to that directory. For example files test1.mat, test2.mat, test3.mat in directory X need to have directories test1, test2, test3 created... (6 Replies)
Discussion started by: AeroEngy
6 Replies

9. Forum Support Area for Unregistered Users & Account Problems

Account creation trouble

I created an account a while back, but never received any confirmation, so I could never get the full access... :( I logged back in today, but I'd forgotten what I'd used for username... anyway, I entered my email address and it said that I would receive my login information, which I... (2 Replies)
Discussion started by: seaghan
2 Replies
Login or Register to Ask a Question