Skip site navigation (1)Skip section navigation (2)
Date:      20 Oct 1998 17:23:14 -0400
From:      Lowell Gilbert <lowell@world.std.com>
To:        freebsd-questions@FreeBSD.ORG, freebsd-doc@FreeBSD.ORG
Cc:        vega@d132-h017.rh.rit.edu
Subject:   Re: shadowing passwords
Message-ID:  <rd6lnmb53nh.fsf@world.std.com>
In-Reply-To: vega@d132-h017.rh.rit.edu's message of 14 Oct 1998 05:27:29 %2B0200
References:  <Pine.BSF.4.05.9810132302560.453-100000@d132-h017.rh.rit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
vega@d132-h017.rh.rit.edu (VEGA) writes, in freebsd-questions:

> is there a mechanism for FreeBsd to
> shadow passwords? i have never
> seen anyhting about it in the FAQ or handbook...

    The short answer is that, yes, FreeBSD comes with a shadow
password system.

    However, this is a good point:  either the handbook or FAQ should
probably say something about this.  Is the following a good start?

================================================================
Passwords

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 do I need to edit these files to change my password?

No.  Normally, the easiest way to do that is 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.

4. Other topics

[Not covered here, and probably shouldn't be:  NIS, Kerberos, login.conf...]

5. More Reading

To administrate a system, you really ought to read the following
manual pages:

passwd(1) : actually, *everyone* ought to read this
chpass(1) : lets users change some other information as well as the
	    password 
vipw(8) : edit the password file
passwd(5) : format of the password file.  Includes information on how
	    to deal with NIS passwords (if you don't know what those
	    are, you don't need to).
login.conf(5) : login class capability database
pwd_mkdb(8) : generate the password databases

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?rd6lnmb53nh.fsf>