Date: 01 Mar 2001 15:54:17 -0500 From: Lowell Gilbert <lowell@world.std.com> To: freebsd-questions@freebsd.org, fbsdq@yahoo.com Subject: Re: Clarification on passwd / master.passwd / spwd.db / pwd.db Message-ID: <rd6n1b5cirq.fsf@world.std.com> In-Reply-To: fbsdq@yahoo.com's message of "1 Mar 2001 19:15:43 %2B0100" References: <SAK.2001.03.01.bbjockrp@support10>
next in thread | previous in thread | raw e-mail | index | archive | help
fbsdq@yahoo.com (Peter) writes:
> I was looking around the system and I have these four password files, I'm not sure what each does:
>
> Ok the .db files are system [not plaintext] versions of /etc/passwd and master.passwd, my
> question is what programs/daemons use these .db files ? Exactly what is their use and the reason
> they they are there, I know for speed but is the speed noticeable using .db files instead of the plaintext
> files? How would I go about building these .db files if I went in and edit /etc/passwd not with vipw but
> just vi. I think I was able to do this, but what if I went with vi and removed everything /etc/passwd
> would my system still work because it'll be using the .db files?
>
> Links for info about this would be appreciated, but e-mail is better .
1. How do passwords work?
FreeBSD uses a "shadow password" system. There is an /etc/passwd
file, as UNIX systems have always had, but it doesn't contain the
actual passwords. Those are kept in /etc/master.passwd (and in a
hashed database /etc/spwd.db).
2. So how do I change my password?
With the 'passwd' command.
3. Editing password files
Password files have more in them than just passwords. As an ordinary
user, the 'chpass' command should be all you need as far as changing
your entry, but for system administration purposes you need a lot
more.
Do *not* just edit the password files themselves. The easiest way to
make your modifications is to use the 'vipw' command, which will bring
up the password file in an editor, and automatically build the
databases for you when you're done editing. If you *do* edit the
master.passwd file directly, make sure to run the pwd_mkdb program on
it afterwards.
Also see the manual for details on vipw(8) and pwd_mkdb(8).
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?rd6n1b5cirq.fsf>
