6 Commits

Author SHA1 Message Date
Jay Larson
0864a18ac2 The following changes were made:
* Added REPO to Makefile
  * usher now uses /bin/sh
  * Removed TARGET from usher
2018-03-29 12:56:55 -05:00
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 53 additions and 22 deletions

View File

@@ -8,14 +8,15 @@
# 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/
REPO = core
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 = 10
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 +44,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 +67,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

@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
set -e set -e
@@ -7,26 +7,27 @@ case $1 in
exit 0 exit 0
;; ;;
postinst) postinst)
if [[ ${TARGET} ]]; then if [ ! -f /etc/login.defs ]; then
if [ ! -f ${TARGET}/etc/shadow ]; then cp /usr/share/shadow/login.defs /etc/login.defs
echo "Converting /etc/passwd to shadow for ${TARGET}" fi
chroot ${TARGET} pwconv if [ ! -f /etc/login.access ]; then
fi cp /usr/share/shadow/login.access /etc/login.access
fi
if [ ! -f /etc/limits ]; then
cp /usr/share/shadow/limits /etc/limits
fi
if [ ! -f /etc/default/useradd ]; then
cp /usr/share/shadow/useradd.default /etc/default/useradd
fi
if [ ! -f ${TARGET}/etc/gshadow ]; then if [ ! -f /etc/shadow ]; then
echo "Converting /etc/group to gshadow for ${TARGET}" echo "Converting /etc/passwd to shadow"
chroot ${TARGET} grpconv pwconv
fi fi
else
if [ ! -f /etc/shadow ]; then
echo "Converting /etc/passwd to shadow"
pwconv
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
;; ;;
prerm) prerm)