Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
585826bc5f | ||
|
|
4ce0021784 | ||
|
|
20f3b112f6 | ||
|
|
754abdb166 | ||
|
|
83939b7c57 |
13
Makefile
13
Makefile
@@ -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
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
|
||||||
17
SNAP/usher
17
SNAP/usher
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user