Web Hosting Talk







View Full Version : FreeBSD Question


ClusterMania
01-16-2002, 06:55 AM
Does FreeBSD /etc/passwd and /etc/shadow ? I want to install a script onto my server and I thought all perl scripts are universal. It was designed for linux but will it work for Freebsd as well? Thanks

T_E_O
01-16-2002, 10:17 AM
Ok, here's the limited information I've gathered on this:

/etc/passwd and /etc/shadow ARE used to specify the users shell etc. but are not the real location where authentication data is kept.
FreeBSD uses some kind of database to store this information.

This is only the information I've gathered while doing some simple jobs on FreeBSD. I've never really searched into this matter :)
So if anyone has more or more accurate information on this subject, please tell us... :)

oh and btw, it's very hard to make perl scripts that change authentication universal, as perl even runs on windows

cperciva
01-16-2002, 11:36 AM
On FreeBSD it's /etc/master.passwd, not /etc/shadow; and you're right, the database functions (getpwuid etc) look up entries in /etc/pwd.db and /etc/spwd.db, which are generated by pwd_mkdb(8).

In general, scripts should call pw(8) instead of attempting to modify the password files directly.