[lkml]   [1998]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: hardlinks.... sucks... ;-(

On 01-Jan-98 Pavel Machek wrote:
>> No, you are not right ;-( There is old Unix hole and you know it. And it's
>> a kernel vfs issue. In general, this is *huge* hole. Novice in
>> sysadmin's world can done this "not kernel issue":

Novices need educating on how UNIX works. Kludgyness to make it, er, ``easy''
to administer is the path that NT took, and generally it either doesn't make it
to administer, or doesn't work. IMHO, of course.

>> user$ ln /etc/passwd ~/.some
>> root# chown newuser /home/user -R
>> This is only common example. And this is a *serious* security bug.

It's a common example of sysadmin luserness. Not a security bug at all.

> No. You just need other tool than chown, you need tool that changes
> uid->uid. And you run it as chown -from olduser -to newuser -R /,
> which looks for all files owned by olduser and makes newuser own
> them. Just go ahead and write this tool. (And mail me a copy ;-). (I
> would also appredicate option to delete such files).

Try something a bit like one of the following:

find / -user 1234 -print | xargs chown 4321
find / -user 1234 -print | xargs rm
find / -user 1234 -exec chown 4321 {} ;
find / -user 1234 -exec rm {} ;

(using approriate escapes to protect from the shell as nessary. In bash \{\} \;)

I did this 'cause Linux gives me a woody. It doesn't generate revenue.
(Dave '-ddt->` Taylor, announcing DOOM for Linux)

 \ /
  Last update: 2005-03-22 13:41    [W:0.033 / U:30.540 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site