- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: User creation !!
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
Forums
Discussions
Discussions
Discussions
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
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
10-10-2006 02:21 AM
10-10-2006 02:21 AM
User creation !!
Is ther anyways, I can create username with passwd inputs(non-interactive) through shell script.
Thxs, WH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2006 02:26 AM
10-10-2006 02:26 AM
Re: User creation !!
You can create a password with 'crypt' and update the '/etc/passwd' file accordingly for the user(s) in question.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2006 02:27 AM
10-10-2006 02:27 AM
Re: User creation !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2006 02:37 AM
10-10-2006 02:37 AM
Re: User creation !!
My requirement is to create 15 users across 50 servers. So i prepared a script will all inputs. But I couldnt set my default passwd through the script.
Anyways to do this.. WH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2006 03:03 AM
10-10-2006 03:03 AM
Re: User creation !!
One thought if using HPUX Trusted system is to use sed to replace the /tcb/files/auth/X/user encrypted password entry or just copy the file from the already setup entry on another host.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2006 03:15 AM
10-10-2006 03:15 AM
Re: User creation !!
did you read:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1050251
and
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=188522
If you have 50 servers to control, why not use NIS ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2006 03:23 AM
10-10-2006 03:23 AM
Re: User creation !!
/usr/sam/lbin/useradd.sam accepts a -p option for supplying an encrypted password. Unlike the regular useradd (to which it's soft-linked, figure that one out), it doesn't automatically create the home directories so you'll have to use other steps for that.
1. Manually add a user and set the password to what you want as the default.
2. Obtain that password and store it in your script.
3. Inline function (w/assumptions on what your datafile looks like)
cat ${file} | while read user pwd uid gid Groups gecos home shell
do
/usr/sam/lbin/useradd.sam -p ${pwd} \
-u ${uid} \
-g ${gid} \
-G ${Groups} \
-c "${gecos}" \
-s ${shell} \
-d ${home} ${user}
mkdir -p ${home}
cp /etc/skel/.[A-z]* ${home}
chown -R ${user}:${gid} ${home}
done
Note that you'll want to protect this script as you would the shadow password file - ie root read only, in a directory structure that is accessible only by root.
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html