ulimit
Stephen J. Friedl
friedl at vsi.COM
Sun Apr 23 14:10:31 AEST 1989
In article <100455 at sun.Eng.Sun.COM>, plocher%sally at Sun.COM (John Plocher) writes:
< In all this talk about ULIMIT don't forget that there is at least
< one known bug in the AT&T SVr[23] implementation:
<
< % su
< password: xxxxxxx
< # cp /etc/passwd /etc/passwd.old ; exit
< % ulimit 0 ; passwd
< (type old/new/again password)
< % ls -l /etc/passwd*
< -rw-r--r-- 1 root 0 Apr 3 10:44 /etc/passwd
< -rw-r--r-- 1 root 439 Apr 3 10:40 /etc/passwd.old
OK so far, we've just trashed the live copy of the password file.
< % su
< password: xxxxxxx
< # cp /etc/passwd.old /etc/passwd
Oops. su will likely fail here ("su: Unknown id: root") and you may
be stuck in a big way (can't become root, can't restore the file, can't
go to single user mode, etc.). If you try this, have a root terminal
session on a nearby terminal *before* you start.
Steve
--
Stephen J. Friedl / V-Systems, Inc. / Santa Ana, CA / +1 714 545 6442
3B2-kind-of-guy / friedl at vsi.com / {attmail, uunet, etc}!vsi!friedl
"I'm making a fashion statement: I'm saying I don't know how to dress." - me
More information about the Comp.bugs.sys5
mailing list