Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Todd Aven <Todd.Aven@BankersTrust.Com>
Subject: Re: putting passwords in auth.db
Date: 1996/10/09	[thread overview]
Message-ID: <325C1BEB.3CE6@BankersTrust.Com> (raw)
In-Reply-To: x7u3sdfbsm.fsf@hexadecimal.uoregon.edu


Steve VanDevender wrote:
> Has anyone successfully used the getprpwent()/putprpwent() routines to
> manipulate the auth.db database, or have other experience relevant to
> using or converting shadow passwd files to work under Digital UNIX?

I have used getprpwent() for things like ftp, pop, and imap servers that
need to authenticate clients against the Digital Unix Enhanced Security
authentication database.  I've not had any real difficulties with this
routine.  I don't recall if I've used putprwent(), but I definitely have 
*not* used it to *create* accounts.

For creating accounts, I wrote a perl script.  The core of the script
creates the (v3.x) protected password entry.  It would seem trivial 
for a reasonably accomplished perl programmer to modify it to clone
non-Digital 
password entries for use on a Digital Unix box.  However, there is no
guarantee 
that this approach doesn't compromise the integrity of the
authentication subsystem!
Below are two snippets of the code, the first for creating the
/etc/passwd entry,
and the second for creating the authentication database entry.  The
second snippet
needs to be revised slightly to support v4.x, where you must use
/tcb/bin/edauth 
to inject the new entry into the authentication database instead of
creating the 
file directly.  That is a trivial exercise in piped commands.

Regards,
Todd

printf PTMP
"$username:*:$new_uid:$new_gid:$fullname:$new_dir:$new_shell\n";

# Create the protected password entry
$first = substr($username,0,1);
$authfile = "/tcb/files/auth/$first/$username";
open(AUTH, ">/tcb/files/auth/$first/$username");
print AUTH "$username:u_name=$username:u_id#$new_uid:\\\n";
print AUTH "\t:u_pwd=$encrypted_password:\\\n";
print AUTH "\t:u_lock\@:\\\n";
print AUTH "\t:chkent:\n";
close(AUTH);
chown 6, 11, $authfile;         # TODO - get 'auth:auth' numbers from
files!
chmod(0660,$authfile);



  reply	other threads:[~1996-10-09  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-02  4:00 putting passwords in auth.db Steve VanDevender
1996-10-09  4:00 ` Todd Aven [this message]
1996-10-10  4:00   ` Randy M. Hayman
1996-10-09  4:00 ` Steve VanDevender
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox