Re: deleting user account: disposition of user's files?

From: Chris Mattern (matternc_at_comcast.net)
Date: 10/27/04


Date: Wed, 27 Oct 2004 15:43:38 -0400

sinister wrote:

> If I delete a user's account, either manually or with userdel, what
> happens
> to files the user owns? (I.e., the system will see them as being owned by
> someone who doesn't exist; is that a problem?)

The system will report them as being owned by uid "x", x being whatever
the user's uid was. Since you now no longer have a user with that uid,
they are effectively not owned by anybody. If another user is created
with that uid, they will then belong to *that* user. Whether or not
this is a problem will tend to depend on your circumstances. find
can actually search out files owned by nonexistant users (-nouser).
>
> Also, some info out there claims that if you don't change ownership, you
> could have a problem because if the userid is recycled, the new user will
> automatically inherit the files of the defunct user.

Yep. Not the userid, the uid--the number associated with the userid.
If that's recycled, all the old files will suddenly belong to the new
user.

> Somewhere else it
> sounded like some systems prevent this by preventing userids from being
> recycled.

Um, no. I don't know of any system that prevents recycling uids. I don't
even know how it would be done--once a userid is deleted, the system has
no way of knowing that that uid was once used.

> What's the convention with SunOs 5.9?

If you recycled a uid, files that belong to it will belong to the new
user. That's true of any UNIX system, anywhere.
>
> TIA,
>
> sjfromm

-- 
             Christopher Mattern
"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


Relevant Pages

  • Re: USS/OMVS chown weirdness!
    ... chown does not set a file owner to a RACF userid, it sets it to the numeric UID corresponding to that userid -- because use of numeric UIDs and GIDs for file/directory ownership is the convention for UNIX file systems. ... When you display the directory, that UID may be displayed as a RACF userid, but only because a backward lookup is being done to convert the numeric UID to a userid. ...
    (bit.listserv.ibm-main)
  • Re: Wie die numerische Userid anzeigen?
    ... >>Wenn ich in der Cygwin-Bash uid aufrufe, bekomme ich als Userid 1000. ... >>Mache ich das in einer Shell der SFU, erhalte ich eine ganz andere uid. ... Burkhard Schultheis ...
    (microsoft.public.de.german.win2000.sonstiges)
  • RE: hfs ishell owner field blank
    ... Your problem is due to you not having a userid in your security database ... assigned with that UID, but that user is no longer in the security ... hfs ishell owner field blank ...
    (bit.listserv.ibm-main)
  • Re: Combo Box Filter according to user log in
    ... Have table with userid, username, password and level of access ... (security table) ... Dim uid As String ... splitting and maintaining the front-end. ...
    (microsoft.public.access.formscoding)
  • [opensuse] Can uids be mapped?
    ... Assume a filesystem A in which "user" has uid 500. ... They belong to different suse installs in the same machine. ...
    (SuSE)