- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- User ID creations
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 02:34 AM
тАО07-08-2009 02:34 AM
User ID creations
I want to preaper a script for userid creation creation on diffrent platform like aix, hp-ux and solaris with gid,home dir location,comment information.
can any body help me on it
Regards
Viney Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 02:41 AM
тАО07-08-2009 02:41 AM
Re: User ID creations
use useradd command
# useradd -u
- Tags:
- useradd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 02:41 AM
тАО07-08-2009 02:41 AM
Re: User ID creations
Me and my pal google will help out.
http://www.unix.com/hp-ux/35414-user-creation-2nd-server.html
http://lists.samba.org/archive/samba-technical/2000-July/008701.html
Like this best:
http://nixcraft.com/hp-ux/742-hp-ux-create-add-users-command-line-using-useradd.html
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 03:10 AM
тАО07-08-2009 03:10 AM
Re: User ID creations
I need to create some 135 users on 250 different platform servers and so how we can create a common script for user creation for all platform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 03:38 AM
тАО07-08-2009 03:38 AM
Re: User ID creations
> I need to create some 135 users on 250 different platform servers and so how we can create a common script for user creation for all platform
I would create a script like this:
# ./addusers
#!/usr/bin/sh
set -u
umask 022
typeset INFILE=$1
typeset OLDIFS=${IFS}
IFS=":"
while read UID NAME GECOS X
do
useradd -u ${UID} -g 20 -s /usr/bin/sh -c "${GECOS}" -m ${NAME}
done < ${INFILE}
IFS=${OLDIFS}
exit 0
...now create an input file that looks like:
# cat ./userstoadd
1000:newuser1:some new user-1
1001:newuser2:some new user-2
1002:newuser3:some new user-3
...and run as:
# ./addusers ./userstoadd
If you need to vary the group or any other parameters, amend the script to fetch addition fields from the input file and add the colon-delimited field to the input too.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 07:43 AM
тАО07-08-2009 07:43 AM
Re: User ID creations
points to note:
useradd on AIX is markedly different than HP's version. No clue what Solaris uses, but it might be different as well.
JRF's script will work nicely for the HP-UX boxes. It could be extended to read a list of (HP) servers, access each in turn and add the users.
that in turn could be extended to read a list of AIX servers, access them and run the appropriate command there as well...then Solaris, using whatever it uses.
With that many servers, I'd be concerned that there will be userid collisions (i.e. login id abc123 has uid 1023 one place, and on another server its 2032 or some such. you'll have to verify that the uid range of the "new" ids isn't in use already on each server.......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 03:31 PM
тАО07-08-2009 03:31 PM
Re: User ID creations
OldSchool's comments are very well taken. In the light of the various platforms you mentioned, I recalled a very feature rich script offered by Dusan Baljevic (otherwise known as 'V2KCOT'). He posted it here:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1138307
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 08:22 PM
тАО07-08-2009 08:22 PM
Re: User ID creations
Please assign some points who give there valuable time for your problem.
To know how to assign points please go through the below link.
http://forums13.itrc.hp.com/service/forums/helptips.do?#33
Suraj