* An ultimate way to remove a user
@ 1999-01-15 5:00 Ivan Dolezal
1999-01-15 5:00 ` Jeff Pabian
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Ivan Dolezal @ 1999-01-15 5:00 UTC (permalink / raw)
Hello,
I run a machine with Enhanced Security. My problem sounds: How to remove
ultimately a user? For good, no track of him. How to do it "pure way?"
When I user "deluser -r", it only retires this user. His track is still
in /etc/passwd what is definitively a TROUBLE, because some of older
applications that I run, test existence of user by finding his login
name in this file.
On the other hand, it probably is not good idea just to remove a line
from /etc/passwd. If it was, then why'd "userdel" in "removeuser"
started yelling:
Working ...userdel: Error: modification of a retired user is not
allowed.
Anyway, I don't know what would be the consequences of just erasing the
line in /etc/passwd?
I'd like to know too, if it is possible to reuse UID of retired user.
Thanks for answers!
Ivan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: An ultimate way to remove a user
1999-01-15 5:00 An ultimate way to remove a user Ivan Dolezal
1999-01-15 5:00 ` Jeff Pabian
@ 1999-01-15 5:00 ` Steen Hansen
1999-01-18 5:00 ` Nikola Milutinovic
2 siblings, 0 replies; 10+ messages in thread
From: Steen Hansen @ 1999-01-15 5:00 UTC (permalink / raw)
When you delete a user, you may want to verify that there are no files hanging
arouynd that is owned by that user. You can do that with
find / -user <usder_name> -print
You may also want to check if that user is listed in the /etc/group file.
I do not have Enhanced Security, so I can't help on that.
Steen
In article <369F33EE.BCC83099@vsb.cz>,
Ivan Dolezal <ivan.dolezal@vsb.cz> wrote:
>Hello,
>
>I run a machine with Enhanced Security. My problem sounds: How to remove
>ultimately a user? For good, no track of him. How to do it "pure way?"
>
>When I user "deluser -r", it only retires this user. His track is still
>in /etc/passwd what is definitively a TROUBLE, because some of older
>applications that I run, test existence of user by finding his login
>name in this file.
>
>On the other hand, it probably is not good idea just to remove a line
>from /etc/passwd. If it was, then why'd "userdel" in "removeuser"
>started yelling:
>
>Working ...userdel: Error: modification of a retired user is not
>allowed.
>
>Anyway, I don't know what would be the consequences of just erasing the
>line in /etc/passwd?
>
>I'd like to know too, if it is possible to reuse UID of retired user.
>
>
>Thanks for answers!
>
>Ivan
>
>
--
Steen Hansen (Hviid), Systems & LAN Admin, The Ohio State University
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: An ultimate way to remove a user
1999-01-15 5:00 An ultimate way to remove a user Ivan Dolezal
@ 1999-01-15 5:00 ` Jeff Pabian
1999-01-15 5:00 ` Steen Hansen
1999-01-18 5:00 ` Nikola Milutinovic
2 siblings, 0 replies; 10+ messages in thread
From: Jeff Pabian @ 1999-01-15 5:00 UTC (permalink / raw)
>>>>> "Ivan" == Ivan Dolezal <ivan.dolezal@vsb.cz> writes:
Ivan> On the other hand, it probably is not good idea just to
Ivan> remove a line from /etc/passwd. If it was, then why'd
Ivan> "userdel" in "removeuser" started yelling:
Hi Ivan,
I believe if you use 'vipw' to delete the user, that should be safe,
and complete.
Check out the man page for it, and I think you'll be okay.
Thanks,
Jeff
--
ANNOYED BY SPACE-TIME VORTEX 57W 24N. SINKING. U-541.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: An ultimate way to remove a user
1999-01-15 5:00 An ultimate way to remove a user Ivan Dolezal
1999-01-15 5:00 ` Jeff Pabian
1999-01-15 5:00 ` Steen Hansen
@ 1999-01-18 5:00 ` Nikola Milutinovic
1999-01-19 5:00 ` jxfaultl
2 siblings, 1 reply; 10+ messages in thread
From: Nikola Milutinovic @ 1999-01-18 5:00 UTC (permalink / raw)
Ivan Dolezal wrote:
>
> Hello,
>
> I run a machine with Enhanced Security. My problem sounds: How to remove
> ultimately a user? For good, no track of him. How to do it "pure way?"
removeuser
> When I user "deluser -r", it only retires this user. His track is still
> in /etc/passwd what is definitively a TROUBLE, because some of older
> applications that I run, test existence of user by finding his login
> name in this file.
The idea behind "retiring user" still eludes me. A retired user cannot
log-in, cannot be removed, or "un-retired" through dxaccounts. What's
the use of it? If I wanted to forbid log-in, I could just lock the user.
I think it is meant for a situation where you have many accounts and
want some of them to automatically seize "live", but without deleting
the files. That is the "lifetime" option of the account.
> On the other hand, it probably is not good idea just to remove a line
> from /etc/passwd. If it was, then why'd "userdel" in "removeuser"
> started yelling:
>
> Working ...userdel: Error: modification of a retired user is not
> allowed.
That's just the way they made it. You must first un-retire user, then
you can remove it. The only way I found, was "edauth". Pain in the ass.
> Anyway, I don't know what would be the consequences of just erasing the
> line in /etc/passwd?
... And not rebuilding the hashed password database? :-) Use vipw.
> I'd like to know too, if it is possible to reuse UID of retired user.
No. That user is still on the system.
Nix.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: An ultimate way to remove a user
1999-01-18 5:00 ` Nikola Milutinovic
@ 1999-01-19 5:00 ` jxfaultl
1999-01-20 5:00 ` Nikola Milutinovic
0 siblings, 1 reply; 10+ messages in thread
From: jxfaultl @ 1999-01-19 5:00 UTC (permalink / raw)
Nikola Milutinovic <Nikola.Milutinovic@ev.co.yu> wrote:
> The idea behind "retiring user" still eludes me. A retired user cannot
I always presumed it was to prevent UID reuse.
Jason.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: An ultimate way to remove a user
1999-01-19 5:00 ` jxfaultl
@ 1999-01-20 5:00 ` Nikola Milutinovic
1999-01-20 5:00 ` Ed Wensell III aka THE StormRaiser
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Nikola Milutinovic @ 1999-01-20 5:00 UTC (permalink / raw)
jxfaultl@bbechtel.com wrote:
>
> Nikola Milutinovic <Nikola.Milutinovic@ev.co.yu> wrote:
> > The idea behind "retiring user" still eludes me. A retired user cannot
>
> I always presumed it was to prevent UID reuse.
For what purpose?
Nix.
--
... And the geeks shall inherit the Earth ...
... Just let us rewire it first!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: An ultimate way to remove a user
1999-01-20 5:00 ` Nikola Milutinovic
1999-01-20 5:00 ` Ed Wensell III aka THE StormRaiser
1999-01-20 5:00 ` Bob Harris
@ 1999-01-20 5:00 ` nick
1999-01-23 5:00 ` Tim Mooney
3 siblings, 0 replies; 10+ messages in thread
From: nick @ 1999-01-20 5:00 UTC (permalink / raw)
> > > The idea behind "retiring user" still eludes me. A retired user cannot
> >
> > I always presumed it was to prevent UID reuse.
>
> For what purpose?
I think that the most common problem of UID reuse is inheriting access
to files through ACLs that contain that UID. The problem can be worked
around (in fact, I think it should be done this way) by only using
group entries in ACLs and religiously cleaning up groups when a UID is
decommissioned (the owner of the file is still a problem however),
but "better safe than sorry" is the modus operandi of many sys
admins. For them, retiring a user is obviously desirable.
--
Nick Dokos - Compaq Computer Corp
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: An ultimate way to remove a user
1999-01-20 5:00 ` Nikola Milutinovic
@ 1999-01-20 5:00 ` Ed Wensell III aka THE StormRaiser
1999-01-20 5:00 ` Bob Harris
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Ed Wensell III aka THE StormRaiser @ 1999-01-20 5:00 UTC (permalink / raw)
Nikola Milutinovic wrote:
> > I always presumed it was to prevent UID reuse.
>
> For what purpose?
>
To keep from accidently giving the wrong access to the wrong files?
Personally, I have never run into it (at least not on my DUNIX
system)... But let's say you have a shared area where a user has created
some files. The person leaves and you truly delete the account,
forgetting about the shared file area. A new user, in a totally
different department, comes in and you use the "use next UID" option.
The new user is assigned the UID of the user that left. Since file
ownership is all UID based once you boil out the username, the new user
is now the owner of those files in that shared area that the previous
person had control over... Perhaps a salary listing (sounds like an IBM
commercial).
That may be one reason not to reuse UID's. Of course, relying on file
ownerships/UIDs for protection is not the best way of doing things, but
it could happen.
--
Until soon...
Ed Wensell III
Systems and Operations Support, Pellissippi State
E-mail hint: A college with a dot net domain?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: An ultimate way to remove a user
1999-01-20 5:00 ` Nikola Milutinovic
1999-01-20 5:00 ` Ed Wensell III aka THE StormRaiser
@ 1999-01-20 5:00 ` Bob Harris
1999-01-20 5:00 ` nick
1999-01-23 5:00 ` Tim Mooney
3 siblings, 0 replies; 10+ messages in thread
From: Bob Harris @ 1999-01-20 5:00 UTC (permalink / raw)
In article <36A5D1FB.1DF8BB28@ev.co.yu>, Nikola Milutinovic
<Nikola.Milutinovic@ev.co.yu> wrote:
>jxfaultl@bbechtel.com wrote:
>>
>> Nikola Milutinovic <Nikola.Milutinovic@ev.co.yu> wrote:
>> > The idea behind "retiring user" still eludes me. A retired user cannot
>>
>> I always presumed it was to prevent UID reuse.
>
>For what purpose?
Old files owned by the previous owner would be inherited by the new user
using the old UID. The new user may not be the correct person to view old
files.
Now old files can be found using various utilities and removed them or
change their ownership, but there are possible ACL's that make it more
difficult. An ACL can contain either a username or a UID. If there are
files that the old user was granted access to via ACL's, the new user may
not be someone you want to view those files via ACL's. Finding all the
ACL's using the old UID may be more difficult.
Quotas are assigned by UID. So cleaning up all the file systems where the
old UID may have had quota is annoying.
There may be other places the old UID was used that are over looked.
From an administrative point of view, it is easier to just use a new UID
and allow the old UID to remain unused until you run out of UIDs and need
to reuse older ones because you have no choice.
--
Bob Harris
"I don't get to tell me what to do, I only get to tell me how to do it."
Comments expressed here are my own and _NOT_ those of my employer.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: An ultimate way to remove a user
1999-01-20 5:00 ` Nikola Milutinovic
` (2 preceding siblings ...)
1999-01-20 5:00 ` nick
@ 1999-01-23 5:00 ` Tim Mooney
3 siblings, 0 replies; 10+ messages in thread
From: Tim Mooney @ 1999-01-23 5:00 UTC (permalink / raw)
In article <36A5D1FB.1DF8BB28@ev.co.yu>,
Nikola Milutinovic <Nikola.Milutinovic@ev.co.yu> wrote:
> jxfaultl@bbechtel.com wrote:
> >
> > Nikola Milutinovic <Nikola.Milutinovic@ev.co.yu> wrote:
> > > The idea behind "retiring user" still eludes me. A retired user cannot
> >
> > I always presumed it was to prevent UID reuse.
>
> For what purpose?
It's required by the C2 spec, under the "object reuse" sections. I believe
the rationale is there.
With regards to the original question: after one of the patch sets in 4.0B
(which was incorporated into 4.0D base, so 4.0D and later all act this way)
you can *not* delete a user using any of the POSIX user tools. removeuser
also won't work, since that just calls `userdel'. `vipw' may not even
work, depending on the size of your password file.
Some possible options:
1) if you have a 4.0B `userdel' command available somewhere (backups, an
older machine, etc) that has not been patched so that it only retires users,
use that instead of /usr/sbin/userdel.
2) do it the way we were forced to before the advent of the POSIX tools; lock
the password file and delete the lines. AFAIK, doing
mkdir /etc/ptmp
is all that's required to sucessfully "lock" the password file. From that
point, you can use a script or whatever to get rid of the lines in the
/etc/passwd file that need to be removed. Be sure to
rmdir /etc/ptmp
mkpasswd
/usr/tcb/bin/convuser -d
after deleting the lines from the password file.
3) log an enhancement request with Compaq, asking them to add an option to
to `userdel' that will allow you to actually remove users, even under C2
security.
Editorial comments: I think it's great that Digital and now Compaq are
serious about making sure their C2 security meets all of the C2 specification,
but they also need to realize that not everyone needs or wants (or can handle!)
the *full* C2 specification. Being able to delete users is something many
sites absolutely require. It's fine if the default behavior in `userdel' is
to retire users with C2 compliance in mind, but there really ought to be an
option to allow sysadmins to ignore the "no object reuse" and delete users
using the nice tools, rather than requiring a return to home grown scripts.
Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~1999-01-23 5:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-15 5:00 An ultimate way to remove a user Ivan Dolezal
1999-01-15 5:00 ` Jeff Pabian
1999-01-15 5:00 ` Steen Hansen
1999-01-18 5:00 ` Nikola Milutinovic
1999-01-19 5:00 ` jxfaultl
1999-01-20 5:00 ` Nikola Milutinovic
1999-01-20 5:00 ` Ed Wensell III aka THE StormRaiser
1999-01-20 5:00 ` Bob Harris
1999-01-20 5:00 ` nick
1999-01-23 5:00 ` Tim Mooney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox