Create a bundle of user ids


 
Thread Tools Search this Thread
Operating Systems AIX Create a bundle of user ids
# 1  
Old 01-30-2014
Create a bundle of user ids

if I want to create a bundle of user ids on some aix servers, if there is a way not need to do "passwd username" one by one user to set the password?

Thanks
# 2  
Old 01-30-2014
Is the chpasswd tool available on your system?
# 3  
Old 01-30-2014
Yes, there is a way
I am assuming you are using your NIM server to create the user on multiple servers.

I am not sure if you are using a script or manually ssh'ing to each host and creating the user.

Its little tricky but it works,
Say you want the password to be abc123 (an user can change after 1st login), and you created the user (say user1) on server1, what you do now is on server1
Code:
passwd user1 --> type in abc123 (twice)
now 
cat /etc/security/passwd | grep -p user1
user1:
        password = XXXXX
        lastupdate = 1387815793

Now you will copy the password (XXXXX) (ofcourse it is not xxxx, but encrypted password), and from NIM you can add a new line to your script below mkuser command

Code:
echo "user1:XXXXX" |chpasswd -e -f ADMCHG

This will have the same password as abc123 on all the server you run the script for that user.
You will set a password and it is changeable 1st time the user login.

Note: user1 is the example I am using for user
# 4  
Old 02-04-2014
You can also try this, i do it in my env..

Code:
mkuser gecos="USER details" id= username
echo "username:password" >>/pass.txt
cat pass.txt | chpasswd
usermod -G groupname username

Example:
Code:
mkuser gecos="Sandeep Kumar - IBM-Application " id=571 ibm075
echo "ibm075:test@123" >>/pass.txt
cat pass.txt | chpasswd
usermod -G App_Adm ibm075

For Multiple serves, use Key less fingerprint SSH.

Thanks,
thala
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

List of all ids,groups, privilege ids

I wish to pull out a list of all user ids on the system, including the privileged ids, the groups to which they belong to. Sometimes after deleting an id also, its home dir does not get deleted or an entry is left behind in /etc/passwd. Can someone help me with a script to achieve both. (2 Replies)
Discussion started by: ggayathri
2 Replies

2. Homework & Coursework Questions

Create script to add user and create directory

first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies

3. Ubuntu

Create New User with the same group nd privileges of the other user

Hi, Anyone can help me on how to duplicate privileges and group for useroradb01 to userrootdb01. I have currently using "useroradb01" and create a newly user "userrootdb01". I want both in the sames privileges and group. Please see the existing users list below; drwxr-xr-x 53 useroradb01... (0 Replies)
Discussion started by: fspalero
0 Replies

4. UNIX for Dummies Questions & Answers

Scripting - process and user ids...Help please

Hello all: Working on a job I was asked get a simple script to perform the following task and would like to ask for some help. I'm looking forward to learning more and diving deeper into the World of Open Source servers. I need a script for a Unix server, using as few lines as possible, that... (4 Replies)
Discussion started by: moahten
4 Replies

5. Shell Programming and Scripting

validate user ids

Hi I have to validate the user ids. It should be numeric. I am using following code echo $input | grep '^\{11\} > /dev/null if echo "error" else echo "Success" fi But when i entered user id as 828^&% the output is 8565 8566 -bash: ^: command not found Means when i entered... (4 Replies)
Discussion started by: KiranKumarKarre
4 Replies

6. Solaris

Howto create new service bundle

Hi, I have created a service referring the below link. https://www.unix.com/tips-tutorials/32987-creating-solaris10-service.html Now am able to import and enable the service. I have placed my xml file under /var/svc/manifest/site The service name is <service ... (3 Replies)
Discussion started by: kalpeer
3 Replies

7. Shell Programming and Scripting

How create a large list of document ids in VI

How can I create a large list of document ids, about a 1,000 or more in a list without having to type them in? If I can list these documents ids with one command I know how to transfer the output to a new vi list. But how can I strip unwanted extra information in this list and leave only the... (1 Reply)
Discussion started by: ruben7566
1 Replies

8. UNIX for Advanced & Expert Users

Other than root user .Normal user is unable to create files

Hi all, I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies

9. UNIX for Dummies Questions & Answers

Creating user ids on multiple systems simultaneously

I am trying to think of a way to create user ids on multiple Linux systems in one fell swoop without logging onto each system indivually. Is there a way to do this with ssh commands? I don't want to use NIS/LDAP solution just a simple shell script utilitarian methodoloy would suffice. Also, I am... (1 Reply)
Discussion started by: darthur
1 Replies
Login or Register to Ask a Question