/etc/shadow

Dennis L. Mumaugh dlm at cuuxb.ATT.COM
Tue Nov 29 08:37:03 AEST 1988


In article <8693 at rpp386.Dallas.TX.US> jfh at rpp386.Dallas.TX.US (The Beach Bum) writes:
    I got impatient.  Attached is my clone which I'll be including in the soon
    to be released login clone.  The routines were all very simple, I didn't
    see any point in holding out ...
    
    This was all written straight off of Dennis' article.  You may do with it
    as you please.  So much for security by obscurity [ Thanks James ... ]
    It is as simple minded as possible, your suggestions, as always, are
    more than welcome.
    
    - John.

A colleague contacted me and expressed concern that the
implementation of /etc/shadow might not exactly reflect that of
AT&T.  I checked John's version of shadow.h and discovered a
small difference over the "Official" shadow.h.  For those with
sizeof(int) == sizeof(long) there is no problem but "All's the
world is not a VAX [or 3B2]." Here is the changed shadow.h:

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  
if test -f 'shadow.h'
then
	echo shar: "will not over-write existing file 'shadow.h'"
else
cat << \SHAR_EOF > 'shadow.h'
/*
 * This information is not derived from AT&T licensed sources.  Posted
 * to the USENET 11/88.
 */

/*
 * Shadow password security file structure.
 */

struct	spwd {
	char	*sp_namp;	/* login name */
	char	*sp_pwdp;	/* encrypted password */
	long	sp_lstchg;	/* date of last change */
	long	sp_max;		/* maximum number of days between changes */
	long	sp_min;		/* minimum number of days between changes */
};

/*
 * Shadow password security file functions.
 */

struct	spwd	*getspent ();
struct	spwd	*getspnam ();
void	setspent ();
void	endspent ();
struct	spwd	*fgetspent ();
int	putspent ();

#define  SHADOW "/etc/shadow"
SHAR_EOF
fi
echo "End of shell archive shadow.h"
exit 0
#	End of shell archive
-- 
=Dennis L. Mumaugh
 Lisle, IL       ...!{att,lll-crg}!cuuxb!dlm  OR cuuxb!dlm at arpa.att.com



More information about the Alt.sources mailing list