[312] in linux-security and linux-alert archive

home help back first fref pref prev next nref lref last post

Re: chfn problem with Linux

daemon@ATHENA.MIT.EDU (Jon Lewis)
Wed Aug 9 04:25:14 1995

Date: Tue, 8 Aug 1995 16:02:33 -0400 (EDT)
From: Jon Lewis <jlewis@inorganic5.chem.ufl.edu>
To: Nick Kralevich <nickkral@parker.EECS.Berkeley.EDU>
cc: linux-alert@tarsier.cv.nrao.edu, linux-security@tarsier.cv.nrao.edu
In-Reply-To: <Pine.HPP.3.91.950808081744.21796A-100000@parker.EECS.Berkeley.EDU>

[mod: Does anyone have a passwd version for which the ulimit hack actually
	works? I checked util-linux-1.5 and 2.2, which do bomb out with
	an unchecked passwd. --okir]

On Tue, 8 Aug 1995, Nick Kralevich wrote:

> Here's another bad one.
> 
> Set file limit to 0.
> run passwd and try to change passwd
> 
> /etc/passwd is empty, and all logins are denied with "Login
> incorrect", i.e. one doesn't know what is wrong.
> 
> By setting file limits low can partially truncate /etc/passwd.

Maybe I did something wrong, or maybe shadow is smarter, but doing this 
did not damage the /etc/shadow or /etc/passwd on a shadowed Linux system.

luke:/var/homes/admin/jlewis$ ulimit -f 0
luke:/var/homes/admin/jlewis$ ulimit -f
0
luke:/var/homes/admin/jlewis$ passwd
Changing password for jlewis
Old Password:
Enter the new password (minimum of 5 characters)
Please use a combination of upper and lower case letters and numbers.
New Password:
Re-enter new password:
luke:/var/homes/admin/jlewis$ ls -l /etc/passwd
-rw-r--r--   1 root     root         1099 Aug  8 12:18 /etc/passwd
luke:/var/homes/admin/jlewis$ ls -l /etc/shadow
-rw-r-----   1 root     shadow        829 Aug  8 15:39 /etc/shadow




------------------------------------------------------------------
 Jon Lewis                      |  Mime attachments are OK
 jlewis@inorganic5.chem.ufl.edu |  But please ask before sending 
 http://inorganic5.chem.ufl.edu |  unsolicited huge files.
                                |  
_____Finger jlewis@inorganic5.chem.ufl.edu for PGP public key_____


home help back first fref pref prev next nref lref last post