Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.sprintlink.net!cs.utexas.edu!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!ensta!bsdtest.ensta.fr!bouyer From: bouyer@ensta.fr (Manuel Bouyer) Newsgroups: comp.unix.bsd.netbsd.misc Subject: Re: crypt() problems and NetBSD Date: 6 Jun 1995 15:18:18 GMT Organization: Techniques Avancees, Paris Lines: 59 Sender: bouyer@bsdtest.ensta.fr (Manuel Bouyer) Message-ID: <3r1rjq$lsg@ici-paris.ensta.fr> References: <3r1l3v$9k@rzsun02.rrz.uni-hamburg.de> NNTP-Posting-Host: bsdtest.ensta.fr In article <3r1l3v$9k@rzsun02.rrz.uni-hamburg.de>, 2schaefe@rzdspc3.informatik.uni-hamburg.de (Leslie Schaefer) writes: > > 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". > > 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 you will also need to recompile statically linked programs, such as init. > > 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? Where did you get the sources ? There is a exportable version of libcrypt in netbsd-current, you can get it from ftp.netbsd.org or ftp.iastate.edu (or some other mirrors). It should compile file on 1.0, perhaps whith minor changes to the Makefile. I think also that the way you compile your shared lib is wrong. Take a look in the distribution sources. -- Manuel Bouyer, Ecole Nationale Superieure de Techniques Avancees, Paris email: bouyer@ensta.fr --