| Blogs | Classifieds | Downloads | FlashChat | Gallery | Googlemap | Invite Friends | Links | Projects | Reviews | Wiki |
| |||||||||
Welcome to the pSeries Tech Forums,
our free peer-based support site for administrators, engineers and architects working with IBM pSeries servers and software. You are currently viewing our site as a guest which gives you limited access to view most discussions, articles, tutorials and access our other free features. By joining our community you will be able to collaborate with administrators, engineers and architects charged with designing, delivering or maintaining IBM pSeries server environments. Founded by a recognized IBM pSeries consultant and IBM Redbook author, pSeries Tech Forums was developed with the single mission of bringing IBM pSeries professionals together into a single self-help community. Registration is fast, simple and absolutely free to all IT professionals with responsibility for or interest in IBM pSeries servers. We invite you to join our community today! If you have any problems with the registration process or your account login, please contact contact support. |
| Our Sponsors | |
| | |
| Want to advertise? | |
![]() |
| | LinkBack | Thread Tools |
|
#1
| ||||
| ||||
I need to create 7000 users for the new server. Our buissness rules sais that if the username is abcd1234 then the default password will be x1234. Is there any script that can do this which the script will read from a text files the usernames and their groups and creat the users with there proper password? p.s. i do not know perl thats why im asking this question" Shkumbin Fida. |
|
#2
| ||||
| ||||
You could probably do this with a simple for loop in KSH for i in $(cat usernames) do <mkuser command using the username> <sed command to take the username and generate password> echo "<username>:<password>" | chpasswd done |
|
#3
| ||||
| ||||
Gurf thanks for the post. Gurf as i wrote it im not very familiar with such things. Ok if you dont mind it lets supose that my text file "usernames" has a raw as this: ab123456 staff #(username and group). What i do till now is like this. mkuser pgrp=staff groups=staff ab123456 and i must put to times the password to change for each new users with command passwd. So please can you define me the right syntax and your way of seting your commands in the for loop for the example that i write it. Remeber the password will take only the fourth characters of the username. thanks in advance |
|
#4
| ||||
| ||||
You could add something like this to what he said: password=`echo $username|cut -c 5-8` What this will do is echoing the username (I assume you will be reading it from a file) and then cutting the 5th through the 8th from the name and assigning them to a variable named password which you can use in the chpasswd command. |
|
#5
| ||||
| ||||
As i saw it the easy way for me is to do this as follow 1. In a executable text file i can do a line from excell as follow: mkuser pgrp=xxxx group=xxxxx ab123456 2. in another text file i can do as followed in step one ab123456:2345 than running the command cat <filename> | chpasswd After executing this two files ill have the users with thair passwords thanks Gurf and Alexisl for telling me the command chpasswd (and olso man help) |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Microsoft Windows 2003 Active Directory integration | FASherman | Tutorials | 25 | April 28th, 2008 07:14 |
| script to add a group of users on AIX 5.3 | kmoekmio | AIX for POWER Systems | 1 | January 9th, 2007 09:26 |
| Lost SAN connection/0514-038 Error loading kernel extension | paulmann | pSeries - System p | 3 | December 14th, 2006 18:54 |