Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 1997 15:54:50 -0800 (PST)
From:      Apikoros of the Sitra Achra <douglas@speakeasy.org>
To:        "Joe \"Marcus\" Clarke" <jmcla@ocala.cs.miami.edu>
Cc:        Bill Sandiford <bill@duey.interlinks.net>, FreeBSD Questions mail list <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Change Password Script
Message-ID:  <Pine.SUN.3.93.971207155409.11961K-100000@eve.speakeasy.org>
In-Reply-To: <Pine.SGI.3.96.971206201330.5984A-100000@ocala.cs.miami.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 7 Dec 1997, Joe "Marcus" Clarke wrote:

> I'm not really sure what uid will be running this script, but from the
> sounds of it, it will be root.  So, use Perl to edit /etc/master.passwd.
> It's a plain text file.  Perl has a crypt routine that accepts a string
> and a salt, and returns the encrypted version.  Use that to encrypt the
> password, then write it out to /etc/master.passwd.  When you're done,
> run pwd_mkdb /etc/master.passwd to get the password change to work.

Dangerous.  Just use expect - it's much, much simpler and doesn't involve
mucking with the /etc/master.passwd directly.
--
"This space intentionally has nothing but text explaining why this space
 has nothing but text explaining that this space would otherwise have been
 left blank, and would have otherwise been left blank."
				- Procurator Odiosus de Infernis




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.93.971207155409.11961K-100000>