- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Deleteing users
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
03-02-2003 08:16 PM
03-02-2003 08:16 PM
I am curious,why when you delete a user but leave files and directories in place do some of the files/directories remain with an owner name of owner name and other times with an owner name of the owner id? Would it screw things up if you were to change the owner id back to the owner name? If I was to do this to two userids would they end up with the smae number (userid #) in the owner field or are they really just owner names converted to owner ids?
Does that make sense, and can anyone clear that up for me?
Thanks Maria.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2003 08:27 PM
03-02-2003 08:27 PM
SolutionIf you leave the files of the user and just delete the user, all the files/directories owned by the corresponding user will show the user-id only. This is because there is no uid to user name resolution since there is no entry in the passwd file or the corresponding NIS maps.
And if you attempt to change the owner id to its name i guess it will give an error saying no such user id exists.
my 2p's.
hth
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2003 08:28 PM
03-02-2003 08:28 PM
Re: Deleteing users
When u delete a user and leave some of his file/directories, The oener for those files/directories would be the id (number). If you create another user with the same uid (nopt user name), the owner will be set as the newly created user..
Eg: User Name : tech001
User id : 1023
ls -ld /user/tech_001.dbf
-rw------- 1 tech001 techgrp 8383 Oct 20 1998 /user/tech_001.dbf
- Delete the user and leave the above mentioned file
ls -ld /user/tech_001.dbf
-rw------- 1 1023 techgrp 8383 Oct 20 1998 /user/tech_001.dbf
- Create another user tech002 with 1023 as the uid,
ls -ld /user/tech_001.dbf
-rw------- 1 tech002 techgrp 8383 Oct 20 1998 /user/tech_001.dbf
Hope i did'nt confuse u...
Nice day,
kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2003 08:31 PM
03-02-2003 08:31 PM
Re: Deleteing users
Your message is slightly confusing to me.
When you delete the user, then the files owned by him will carry the ownership of his/her numeric login id.
However, if you have another user with the same id, then they will appear with the other login name as the owner.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2003 08:49 PM
03-02-2003 08:49 PM
Re: Deleteing users
When you delete a user leaving his files,then those files will have the UID as the owner of the file.
When you create a new user of the same UID then that user will become the owner of those files.
When you create the same user with the same UID as before then the permissions and the ownership should be the same,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2003 09:00 PM
03-02-2003 09:00 PM
Re: Deleteing users
Before you delete a user account it is important to make sure you find out first where are the location of this user's files and directories in your system ( I'm not talking about just the home directory as the user could have files everywhere out of his/her home dir). Once these are identified, you would determined if they are important files or not (eg: data files) and if they are some chose to transfer the ownership to another UID. If they are not, these files and dirs should be deleted first before you blow away the account.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2003 09:59 PM
03-02-2003 09:59 PM
Re: Deleteing users
Under Unix all files are owned by some or the other user which is always in the numeric form(user ID and Group ID) But this is always translated from /etc/passwd and /etc/group file.
So when you delete a user the files owned by that gets subsituted by the numeric Id because it can not find refrence of that ID to the user name any more. And this owenship information is kept in the Inode as long as the file is there or the ownership is not changed manually. Ok now when you create a user with the same UID then the UID gets translated by password file and the user name is replaced by that ID. In other sence this user becomes the owner of those files.
To delete a user whose files you dont require use userdel -r . Also you can search the whole system for (which will slow down the system a bit) for any files with numeric UID. Use find with -nouser option. Or go through the man pages of find.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2003 10:29 PM
03-02-2003 10:29 PM
Re: Deleteing users
How are you deleting users? SAM and userdel (actually: /usr/sbin/userdel) will handle the former user's files/directories. Simply removing an entry in the passwd file leaves user 'droppings' all over the system.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 02:48 PM
03-03-2003 02:48 PM
Re: Deleteing users
Bill, I am using sam to remove the users.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 02:50 PM
03-03-2003 02:50 PM
Re: Deleteing users
// but I still wonder how it is that not all the files that were left behind changed the owner name to the uid. //
can you do a 'grep owner /etc/passwd' and see if the owner is still there?. If not, there is no way you can see the files owned by that login name. The only possibility is if you have duplicate ids.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2003 03:18 PM
03-03-2003 03:18 PM
Re: Deleteing users
If I recall correctly, SAM offers you the ability to simply delete the user and simply leave his/her files untouched; to delete the user *and* all files in his/here $HOME directory; to delete the user *and* all files owned by him/her; or to delete the user and transfer the ownership of any of his/her files to another user. Does this clarifies the behavior you see.
Regards!
...JRF...