*BSD News Article 44984


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!xlink.net!news.dfn.de!news.dkrz.de!news.rrz.uni-hamburg.de!rzdspc3.informatik.uni-hamburg.de!2schaefe
From: 2schaefe@rzdspc3.informatik.uni-hamburg.de (Leslie Schaefer)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: crypt() problems and NetBSD
Date: 6 Jun 1995 13:27:27 GMT
Organization: University of Hamburg -- Germany
Lines: 44
Message-ID: <3r1l3v$9k@rzsun02.rrz.uni-hamburg.de>
NNTP-Posting-Host: rzdspc3.informatik.uni-hamburg.de
X-Newsreader: TIN [version 1.2 PL2]


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'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