Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0864a18ac2 | ||
|
|
585826bc5f | ||
|
|
4ce0021784 | ||
|
|
20f3b112f6 | ||
|
|
754abdb166 | ||
|
|
83939b7c57 |
14
Makefile
14
Makefile
@@ -8,14 +8,15 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
DEPENDS = acl,attr,glibc
|
||||
DEPENDS = glibc,libacl,libattr
|
||||
ARCH = x86_64
|
||||
URL = http://pkg-shadow.alioth.debian.org/
|
||||
REPO = core
|
||||
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 = 5
|
||||
SNAPVER = 10
|
||||
|
||||
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
||||
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
||||
@@ -43,7 +44,6 @@ $(SRCDIR)/configure: $(ARCHIVE)
|
||||
$(SRCDIR)/config.log: $(SRCDIR)/configure
|
||||
@cd $(SRCDIR) && \
|
||||
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
|
||||
echo "WTF: $$patch"; \
|
||||
patch --verbose -Np1 -i $$patch; \
|
||||
done
|
||||
@cd $(SRCDIR); \
|
||||
@@ -67,6 +67,14 @@ $(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 && \
|
||||
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:
|
||||
@rm -rvf $(ROOT) \
|
||||
$(SNAPINFO) \
|
||||
|
||||
22
SNAP/useradd.default
Normal file
22
SNAP/useradd.default
Normal 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
|
||||
39
SNAP/usher
39
SNAP/usher
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
@@ -7,26 +7,27 @@ case $1 in
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
if [[ ${TARGET} ]]; then
|
||||
if [ ! -f ${TARGET}/etc/shadow ]; then
|
||||
echo "Converting /etc/passwd to shadow for ${TARGET}"
|
||||
chroot ${TARGET} pwconv
|
||||
fi
|
||||
if [ ! -f /etc/login.defs ]; then
|
||||
cp /usr/share/shadow/login.defs /etc/login.defs
|
||||
fi
|
||||
if [ ! -f /etc/login.access ]; then
|
||||
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
|
||||
echo "Converting /etc/group to gshadow for ${TARGET}"
|
||||
chroot ${TARGET} grpconv
|
||||
fi
|
||||
else
|
||||
if [ ! -f /etc/shadow ]; then
|
||||
echo "Converting /etc/passwd to shadow"
|
||||
pwconv
|
||||
fi
|
||||
if [ ! -f /etc/shadow ]; then
|
||||
echo "Converting /etc/passwd to shadow"
|
||||
pwconv
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/gshadow ]; then
|
||||
echo "Converting /etc/group to gshadow for ${TARGET}"
|
||||
grpconv
|
||||
fi
|
||||
if [ ! -f /etc/gshadow ]; then
|
||||
echo "Converting /etc/group to gshadow"
|
||||
grpconv
|
||||
fi
|
||||
;;
|
||||
prerm)
|
||||
|
||||
Reference in New Issue
Block a user