2 Commits

Author SHA1 Message Date
Jay Larson
20f3b112f6 Corrected version number 2017-05-16 19:56:59 -05:00
Jay Larson
754abdb166 Added useradd default file and usher to manage it 2017-05-16 19:54:01 -05:00
3 changed files with 32 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ BRIEF = Shadow password utilities
DESC = This package includes the programs necessary to convert traditional \
V7 UNIX password files to the SVR4 shadow password format and additional \
tools to work with shadow passwords.
SNAPVER = 6
SNAPVER = 7
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
@@ -66,6 +66,10 @@ $(ROOT): $(SRCDIR)/src/vipw
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
mv $(ROOT)/usr/bin/passwd $(ROOT)/bin/passwd
@install -v -d -m 755 $(ROOT)/usr/share/shadow && \
install -v -m 644 $(PWD)/SNAP/useradd.default \
$(ROOT)/usr/share/shadow/useradd.default
clean:
@rm -rvf $(ROOT) \
$(SNAPINFO) \

22
SNAP/useradd.default Normal file
View File

@@ -0,0 +1,22 @@
# Default configuration for the useradd utility
# The default user shell
SHELL=/bin/bash
# The default GID If the -n option is used
#GROUP=100
# Default user home directory
#HOME=/home
# Number of days until account deactivation for expired password
#INACTIVE=-1
# The date on which the user account is disabled
#EXPIRE=
# Skeleton directory used to populate a new user's home directory
#SKEL=/etc/skel
# Create mail spool file during new account creation
#CREATE_MAIL_SPOOL=yes

View File

@@ -24,10 +24,14 @@ case $1 in
fi
if [ ! -f /etc/gshadow ]; then
echo "Converting /etc/group to gshadow for ${TARGET}"
echo "Converting /etc/group to gshadow"
grpconv
fi
fi
if [ ! -f ${TARGET}/etc/default/useradd ]; then
cp ${TARGET}/usr/share/shadow/useradd.default /etc/default/useradd
fi
;;
prerm)
exit 0