- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Help Changing UID
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
09-19-2003 07:39 AM
09-19-2003 07:39 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2003 07:43 AM
09-19-2003 07:43 AM
Re: Help Changing UID
The UID simply needs to be unique. You can edit the password file (carefully) with vi or vipw and manually change the UID numbers that you need to.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2003 07:52 AM
09-19-2003 07:52 AM
Re: Help Changing UID
consider that files already created will NOT automatically change their uids - you need a find command like this:
find DIR -user OLDid1 -print | xargs chown NEWid1
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2003 07:55 AM
09-19-2003 07:55 AM
Re: Help Changing UID
Once you manually change the UID you will need to change the owner of any files that were created by or assigned to the old UID.
Have fun
-Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2003 08:07 AM
09-19-2003 08:07 AM
Re: Help Changing UID
It is the preferred method of editing /etc/passwd
As a practical matter, if you are the only administtrator, there is little harm that can be done by using vi. Still, vipw is better.
Its very important that every uid be unique. Never change a uid to zero(I don't think you will).
Its always a good idea to run pwck after a /etc/passwd edit to make sure you didn't make a mistake. Also, prior to working back up the file and make the permissions on the backup very restricitve.
If you leave a copy of passwd laying around it is a hacker/crack user's dream.
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
09-19-2003 08:16 AM
09-19-2003 08:16 AM
Re: Help Changing UID
you also can do it with SAM. Go to 'users' - mark one user, than under 'Actions' you have the choice 'Modify'. Sorting the list to UID, so you can check that all are unique UID's.
Regards
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2003 08:16 AM
09-19-2003 08:16 AM
Re: Help Changing UID
usermod -u ###### login_name
where ######=new UID
Be advised that you'll have to do a find -user login_name -exec chown.......so the users' files will have proper ownership post-change.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2003 08:39 AM
09-19-2003 08:39 AM
Re: Help Changing UID
Thanks for all the good info, as a followup how can I see the relationship between the UID and the username on a file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2003 08:45 AM