- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- changing the 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
11-14-2002 08:41 AM
11-14-2002 08:41 AM
changing the uid
I have a request to change the users uid from 101 to 111. What does it require to do this.
I have lots of file created by this user in many directories.
I need to change the uid to this user(batch) and change all the files owned by this user?? Does the files owned by this user have the uid information kept somewhere?
What is the best way to achieve this? Pl help.
Raji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 08:43 AM
11-14-2002 08:43 AM
Re: changing the uid
follow this link
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xe5324b3ef09fd611abdb0090277a778c,00.html
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 08:46 AM
11-14-2002 08:46 AM
Re: changing the uid
you can change the user id by executing
usermod -u 111
all the files in the users home directory will change automatically. For the rest you will have to change them manually.
Something like this should work
find / -user
This will look everywhere and change the ownership of all files owned by olduserid to teh new user id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 08:47 AM
11-14-2002 08:47 AM
Re: changing the uid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 08:50 AM
11-14-2002 08:50 AM
Re: changing the uid
You can do this with 'usermod' and 'find'. 'usermod will perform the necessary changes to the 'etc/passwd'. Use 'find' to find and change the ownership:
# find / -user oldid -exec chown newname {} \;
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 08:53 AM
11-14-2002 08:53 AM
Re: changing the uid
will change the uid of user tom to 111. It will not change the ownerships of the files. Man usermod for details.
To do that:
find / -user 101 -exec chown tom {} \;
I dont like to start a find from / but this may be your only choice unless for example you know that all his files will be located in ,perhaps 3 directorties /usr,/home, & /data,
in that case:
find /usr /home /data -user 101 -exec chown tom {} \;
Man find for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2002 07:21 AM
11-15-2002 07:21 AM
Re: changing the uid
sam->Accounts for users and groups->Users->Actions->Modify
Sam will take care of usermod and file ownerships, reliably in my experience unless you restart the system while the batch jobs are running. If you change username instead of uid, SAM will get everything except the name of the sendmail mbox, if there is one, so you'd have to do that manually.