- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Automate 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
04-19-2005 11:05 AM
04-19-2005 11:05 AM
Automate user creation
cat /etc/passwd | while read LINE
do
useradd option option
done
Not sure how to parse the passwd file to get the uid, gid, home etc.
Thanks in advance,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 11:18 AM
04-19-2005 11:18 AM
Re: Automate user creation
Something like
cat /etc/passwd | while read LINE
do
echo $LINE | awk -F: '{print $3, $4, $6}' | \
read -r gid uid home
useradd option option
do
- Biswajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 01:27 PM
04-19-2005 01:27 PM
Re: Automate user creation
And if the systems are trusted then copy the /tcb files or other option is to untrust the system first and then coppy passwd and group files.
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:09 PM
04-19-2005 02:09 PM
Re: Automate user creation
The systems are trusted; So copying the password file and the /tcb directory to the other systems should do the trick? What about the user's password, would that be the same on the target server?
Thanks,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:28 PM
04-19-2005 02:28 PM
Re: Automate user creation
The users password are stored in /tcb/files/auth so all the password will remain as it was on the old system.
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 03:59 PM
04-19-2005 03:59 PM
Re: Automate user creation
Instead of replicating the accounts on the other servers have you though about configuring NIS / NIS +
This allows one account on the nis master and with the correct config you can have access to any other serve rin that domain.
We use that here in one of our networks and it works well.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 04:25 PM
04-19-2005 04:25 PM
Re: Automate user creation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 04:40 PM
04-19-2005 04:40 PM
Re: Automate user creation
This script simply runs from /etc/profile and copies the /tcb/files/auth/?/
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 05:09 PM
04-19-2005 05:09 PM
Re: Automate user creation
Bill Hassell, sysadmin