*BSD News Article 45060


Return to BSD News archive

Newsgroups: comp.unix.bsd.netbsd.misc
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!noc.netcom.net!ix.netcom.com!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!ames!cnn.nas.nasa.gov!lestat.nas.nasa.gov!thorpej
From: thorpej@lestat.nas.nasa.gov (Jason R. Thorpe)
Subject: Re: crypt() problems and NetBSD
Message-ID: <D9rJ3x.EBr@cnn.nas.nasa.gov>
Lines: 56
Sender: news@cnn.nas.nasa.gov (News Administrator)
Nntp-Posting-Host: lestat.nas.nasa.gov
Organization: Numerical Aerodynamic Simulation Project - NASA Ames
References: <3r1l3v$9k@rzsun02.rrz.uni-hamburg.de>
Date: Tue, 6 Jun 1995 17:55:09 GMT

In article <3r1l3v$9k@rzsun02.rrz.uni-hamburg.de>,
Leslie Schaefer <2schaefe@rzdspc3.informatik.uni-hamburg.de> wrote:

>Help....
>I've just installed NetBSD 1.0 for a project and after setting the root 
>password I get a message "Warning  crypt(3) not present in this system".

You have to install the security package with 1.0 in order to get any
working crypt...

>Unfortunately the root read / write protection on the password database 
>(/etc/passwd /etc/master.passwd and /etc pwd.db) are not acceptable for
>the project. I've two different implimentations of the crypt function
>and all that surrounds it, is it as easy as I think - just compile
>the thing and substitute it for the /usr/lib/libcrypt.so.0.0 ?
>
>I've tried this but only get core dumps as soon as I try to access a 
>command and must reboot on floppy and replace the lib with the original
>before the system works ok.
>
>Is there some trick to the compile or is the whole passwd system re-engineered
>around non-encrypted passwords?
>
>Here's how I compiled the crypt sources to generate the shared lib:
>SOURCES=...
>OBJECTS=...
>TARGET=libcrypt.so.0.0
>CC=gcc
>SOURCES=...
>OBJECTS=...
>LD=ld
>RANLIB=ranlib
>...
>...
>		$(CC) $(CFLAGS) -c $(SOURCES)
>		$(LD) -x -r $(OBJECTS)
>		mv a.out $(STAGE2)
>		rm -f $(STAGE2LIB)
>		ar cq $(STAGE2LIB) `lorder $(STAGE2) | tsort`
>		$(RANLIB) $(STAGE2LIB)
>		rm -f $(TARGET)
>		$(LD) -x -Bshareable -Bforcearchive -o $(TARGET) \
>			$(STAGE2LIB)
>
>Has anyone an idea what I am doing wrong? Is it possible to do what I
>want to?
>
>
>Many thanks in advance for the help, Les Schaefer


-- 
Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffet Field, CA 94035                                 Pager: 415.428.6939