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?  


Reply
 
LinkBack Thread Tools
  #1  
Old August 4th, 2006
s.fida's Avatar
s.fida Offline
s.fida
 
Join Date: June 2006
Location: Diber
Posts: 43
Send a message via MSN to s.fida
anyone has a script for creating users with password defined

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old August 4th, 2006
Gurft's Avatar
Gurft Offline
AIX Build *****istrator
 
Join Date: July 2006
Location: North Wales, PA
Posts: 15
Send a message via Yahoo to Gurft
Re: anyone has a script for creating users with password defined

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old August 7th, 2006
s.fida's Avatar
s.fida Offline
s.fida
 
Join Date: June 2006
Location: Diber
Posts: 43
Send a message via MSN to s.fida
Re: anyone has a script for creating users with password defined

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old August 9th, 2006
alexisl's Avatar
alexisl Offline
Senior Member
 
Join Date: June 2006
Posts: 147
Re: anyone has a script for creating users with password defined

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old August 9th, 2006
s.fida's Avatar
s.fida Offline
s.fida
 
Join Date: June 2006
Location: Diber
Posts: 43
Send a message via MSN to s.fida
Re: anyone has a script for creating users with password defined

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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

These are the 100 most searched terms
Search Cloud
0042-001 0042-001 nim 0513-001 the system resource controller daemon is not active 0513-001 the system resource controller daemon is not active. 0514-061 0514-061 cannot find a child device 0514-061 cannot find a child device. 0516-787 0516-787 extendlv 0516-787 extendlv: maximum allocation for logical volume 110000ac aa00e1f3 aio aix aix aio aix freeware aixif_arp_dup_addr b150f22a b181fb53 ba010004 c1001020 d133c002 dacnone dcb47997 dlpar fcp_array_err6 fget_config gnu tar aix gsclvmd gtar aix hi yall hmc root password hmc vmware hscl05db ibm p6 ibm p6 520 libpopt aix libpopt.a libpopt.a(libpopt.so.0) is needed by rsync-2.6.2-1 migratelv mksysb navisphere agent nim server pseries pseriestech rsync aix sc_disk_err4 scan_error_chrp vio server websm xhost file ... powered by Simple Search Cloud


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Powered by vbWiki Pro 1.3 RC5. Copyright ©2006-2007, NuHit, LLC

vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48