5 Commits

Author SHA1 Message Date
Jay Larson
585826bc5f Installing of login.defs, login.access, limits, and /etc/default/useradd
are now performed before attempting to run pwconv
2017-10-17 15:47:09 -05:00
Jay Larson
4ce0021784 Removed user configurable files from files.tar.gz - now managed by usher 2017-05-31 09:42:02 -05:00
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
Jay Larson
83939b7c57 The following changes were made to Makefile:
* corrected dependencies
  * removed unneeded debug output
2017-04-06 13:34:44 -05:00
3 changed files with 48 additions and 4 deletions

View File

@@ -8,14 +8,14 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
DEPENDS = acl,attr,glibc DEPENDS = glibc,libacl,libattr
ARCH = x86_64 ARCH = x86_64
URL = http://pkg-shadow.alioth.debian.org/ URL = http://pkg-shadow.alioth.debian.org/
BRIEF = Shadow password utilities BRIEF = Shadow password utilities
DESC = This package includes the programs necessary to convert traditional \ DESC = This package includes the programs necessary to convert traditional \
V7 UNIX password files to the SVR4 shadow password format and additional \ V7 UNIX password files to the SVR4 shadow password format and additional \
tools to work with shadow passwords. tools to work with shadow passwords.
SNAPVER = 5 SNAPVER = 9
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
@@ -43,7 +43,6 @@ $(SRCDIR)/configure: $(ARCHIVE)
$(SRCDIR)/config.log: $(SRCDIR)/configure $(SRCDIR)/config.log: $(SRCDIR)/configure
@cd $(SRCDIR) && \ @cd $(SRCDIR) && \
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \ for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
echo "WTF: $$patch"; \
patch --verbose -Np1 -i $$patch; \ patch --verbose -Np1 -i $$patch; \
done done
@cd $(SRCDIR); \ @cd $(SRCDIR); \
@@ -67,6 +66,14 @@ $(ROOT): $(SRCDIR)/src/vipw
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \ @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
mv $(ROOT)/usr/bin/passwd $(ROOT)/bin/passwd 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 && \
rm -v $(ROOT)/etc/default/useradd && \
mv -v $(ROOT)/etc/{login.{defs,access},limits} \
$(ROOT)/usr/share/shadow && \
rmdir $(ROOT)/etc/default $(ROOT)/etc
clean: clean:
@rm -rvf $(ROOT) \ @rm -rvf $(ROOT) \
$(SNAPINFO) \ $(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

@@ -7,6 +7,21 @@ case $1 in
exit 0 exit 0
;; ;;
postinst) postinst)
if [ ! -f ${TARGET}/etc/login.defs ]; then
cp ${TARGET}/usr/share/shadow/login.defs ${TARGET}/etc/login.defs
fi
if [ ! -f ${TARGET}/etc/login.access ]; then
cp ${TARGET}/usr/share/shadow/login.access \
${TARGET}/etc/login.access
fi
if [ ! -f ${TARGET}/etc/limits ]; then
cp ${TARGET}/usr/share/shadow/limits ${TARGET}/etc/limits
fi
if [ ! -f ${TARGET}/etc/default/useradd ]; then
cp ${TARGET}/usr/share/shadow/useradd.default \
${TARGET}/etc/default/useradd
fi
if [[ ${TARGET} ]]; then if [[ ${TARGET} ]]; then
if [ ! -f ${TARGET}/etc/shadow ]; then if [ ! -f ${TARGET}/etc/shadow ]; then
echo "Converting /etc/passwd to shadow for ${TARGET}" echo "Converting /etc/passwd to shadow for ${TARGET}"
@@ -24,7 +39,7 @@ case $1 in
fi fi
if [ ! -f /etc/gshadow ]; then if [ ! -f /etc/gshadow ]; then
echo "Converting /etc/group to gshadow for ${TARGET}" echo "Converting /etc/group to gshadow"
grpconv grpconv
fi fi
fi fi