- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /etc/passwd file
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
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
тАО12-30-2004 06:55 AM
тАО12-30-2004 06:55 AM
Any help would be greatly appreciated.
Tom
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 07:06 AM
тАО12-30-2004 07:06 AM
Re: /etc/passwd file
ids:*:101:101:IDS/9000 Administrator:/home/ids:/sbin/sh
System is trusted, * instead of encrypted password.
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
тАО12-30-2004 07:07 AM
тАО12-30-2004 07:07 AM
Re: /etc/passwd file
Here is one way to do it. First, create an ASCII file containing the account name and the real user name from the other system. Call it names.txt, and assume it looks something like this:
jpoff John Poff
tomv Tom Vormwald
Now, a little script snippet like this would read this file and use the usermod command to update the name field:
while read user LINE; do usermod -c \"$LINE\" $user ; done
Just one way to do it.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 07:40 AM
тАО12-30-2004 07:40 AM
Re: /etc/passwd file
>while read user LINE; do usermod -c \"$LINE\" $user ; done
Or should I place it in it's own shell and run the script?
Thanks,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 07:49 AM
тАО12-30-2004 07:49 AM
Re: /etc/passwd file
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 07:50 AM
тАО12-30-2004 07:50 AM
Re: /etc/passwd file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:00 AM
тАО12-30-2004 08:00 AM
Re: /etc/passwd file
Bob James rc00123
then ran the command:
while read user LINE; do usermod -c \"$LINE\" $user ; done
Error message below:
User name must be specified
Usage: usermod [-u
] [-f <inactive>] [-e <expire>] [-l <new logname>] <login><BR /><BR /><BR />What did I miss?<BR /><BR />
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:06 AM
тАО12-30-2004 08:06 AM
Re: /etc/passwd file
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:07 AM
тАО12-30-2004 08:07 AM
Re: /etc/passwd file
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:10 AM
тАО12-30-2004 08:10 AM
Re: /etc/passwd file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:13 AM
тАО12-30-2004 08:13 AM
Re: /etc/passwd file
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:14 AM
тАО12-30-2004 08:14 AM
Re: /etc/passwd file
rc00123 Bob James
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:16 AM
тАО12-30-2004 08:16 AM
Re: /etc/passwd file
rc00123 Bob James
rc01223 Jesse Jones
etc...
Same error comes up as before. Any thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:41 AM
тАО12-30-2004 08:41 AM
Re: /etc/passwd file
Worked like a charm, thanks so much. Saved my New Year.
Thanks Again,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-30-2004 08:43 AM
тАО12-30-2004 08:43 AM
Re: /etc/passwd file
you can also try this from command line,
# cat names.txt |while read user line
>do
>usermod -c "$line" $user
>done
You will not be able to run this command "usermod" for any user who is currently logged in. it will give you an error. However for users who are not logged in, it would still work okay.
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-31-2004 04:04 AM
тАО12-31-2004 04:04 AM
Re: /etc/passwd file
After importing the names for the 2 other servers into a file (names.txt) and running the above command the /etc/passwd file is now populated with the users real names.
Many thanks.
Tom