f4d17450 |
Summary: Programs for handling passwords in a secure way
Name: shadow |
66b1679b |
Version: 4.2.1 |
e544e62b |
Release: 4%{?dist} |
f4d17450 |
URL: http://pkg-shadow.alioth.debian.org/
License: BSD
Group: Applications/System
Vendor: VMware, Inc.
Distribution: Photon |
66b1679b |
Source0: http://pkg-shadow.alioth.debian.org/releases/%{name}-%{version}.tar.xz
%define sha1 shadow=0917cbadd4ce0c7c36670e5ecd37bbed92e6d82d |
e544e62b |
Source1: PAM-Configuration-Files-1.3.tar.gz
%define sha1 PAM=35b491506cefbafeb63a86a89084775123be971b |
6f76727e |
Patch0: chkname-allowcase.patch |
2530f4b1 |
BuildRequires: cracklib
BuildRequires: cracklib-devel
Requires: cracklib
Requires: cracklib-dicts
BuildRequires: Linux-PAM
Requires: Linux-PAM |
f4d17450 |
%description
The Shadow package contains programs for handling passwords
in a secure way.
%prep
%setup -q -n %{name}-%{version} |
2530f4b1 |
%setup -q -T -D -a 1 |
6f76727e |
%patch0 -p1 |
f4d17450 |
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \
-e 's@/var/spool/mail@/var/mail@' etc/login.defs
sed -i 's@DICTPATH.*@DICTPATH\t/usr/share/cracklib/pw_dict@' \
etc/login.defs
%build
./configure \
--sysconfdir=/etc \ |
2530f4b1 |
--with-libpam \
--with-libcrack \
--with-group-name-max-length=32 |
f4d17450 |
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
install -vdm 755 %{buildroot}/bin
mv -v %{buildroot}%{_bindir}/passwd %{buildroot}/bin
sed -i 's/yes/no/' %{buildroot}/etc/default/useradd |
96763cf6 |
# Use group id 100(users) by default
sed -i 's/GROUP.*/GROUP=100/' %{buildroot}/etc/default/useradd
# Disable usergroups. Use "users" group by default (see /etc/default/useradd)
# for all nonroot users.
sed -i 's/USERGROUPS_ENAB.*/USERGROUPS_ENAB no/' %{buildroot}/etc/login.defs |
f4d17450 |
cp etc/{limits,login.access} %{buildroot}/etc |
2530f4b1 |
for FUNCTION in FAIL_DELAY \
FAILLOG_ENAB \
LASTLOG_ENAB \
MAIL_CHECK_ENAB \
OBSCURE_CHECKS_ENAB \
PORTTIME_CHECKS_ENAB \
QUOTAS_ENAB \
CONSOLE MOTD_FILE \
FTMP_FILE NOLOGINS_FILE \
ENV_HZ PASS_MIN_LEN \
SU_WHEEL_ONLY \
CRACKLIB_DICTPATH \
PASS_CHANGE_TRIES \
PASS_ALWAYS_WARN \
CHFN_AUTH ENCRYPT_METHOD \
ENVIRON_FILE
do
sed -i "s/^${FUNCTION}/# &/" %{buildroot}/etc/login.defs
done |
7733b8b8 |
|
9f5b9ef0 |
sed -i "s/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/" %{buildroot}/etc/login.defs |
7733b8b8 |
|
2530f4b1 |
pushd PAM-Configuration-Files
install -vm644 * %{buildroot}%{_sysconfdir}/pam.d/
popd |
92e58245 |
for PROGRAM in chfn chgpasswd chsh groupadd groupdel \ |
2530f4b1 |
groupmems groupmod newusers useradd userdel usermod
do
install -v -m644 %{buildroot}%{_sysconfdir}/pam.d/chage %{buildroot}%{_sysconfdir}/pam.d/${PROGRAM}
sed -i "s/chage/$PROGRAM/" %{buildroot}%{_sysconfdir}/pam.d/${PROGRAM}
done |
f4d17450 |
%find_lang %{name}
%post
%{_sbindir}/pwconv
%{_sbindir}/grpconv
%files -f %{name}.lang
%defattr(-,root,root)
%config(noreplace) /etc/login.defs
%config(noreplace) /etc/login.access
%config(noreplace) /etc/default/useradd
%config(noreplace) /etc/limits
/bin/*
/sbin/nologin
%{_bindir}/*
%{_sbindir}/*
%{_mandir}/*/* |
2530f4b1 |
%{_sysconfdir}/pam.d/* |
f4d17450 |
%changelog |
e544e62b |
* Mon May 2 2016 Xiaolin Li <xiaolinl@vmware.com> 4.2.1-4
- Enabling pam_systemd module in a session. |
9f5b9ef0 |
* Fri Apr 29 2016 Divya Thaluru <dthaluru@vmware.com> 4.2.1-3
- Setting password aging limits to 90 days |
7733b8b8 |
* Wed Apr 27 2016 Divya Thaluru <dthaluru@vmware.com> 4.2.1-3
- Setting password aging limits to 365 days |
eff4fe42 |
* Wed Mar 23 2016 Divya Thaluru <dthaluru@vmware.com> 4.2.1-2
- Enabling pam_limits module in a session |
66b1679b |
* Tue Jan 12 2016 Anish Swaminathan <anishs@vmware.com> 4.2.1-1
- Update version |
fd0bd342 |
* Wed Dec 2 2015 Divya Thaluru <dthaluru@vmware.com> 4.1.5.1-6
- Fixed PAM Configuration file for passwd |
6f76727e |
* Mon Oct 26 2015 Sharath George <sharathg@vmware.com> 4.1.5.1-5
- Allow mixed case in username. |
92e58245 |
* Mon Jun 29 2015 Divya Thaluru <dthaluru@vmware.com> 4.1.5.1-4
- Fixed PAM Configuration file for chpasswd |
96763cf6 |
* Tue Jun 16 2015 Alexey Makhalov <amakhalov@vmware.com> 4.1.5.1-3
- Use group id 100(users) by default |
2530f4b1 |
* Wed May 27 2015 Divya Thaluru <dthaluru@vmware.com> 4.1.5.1-2
- Adding PAM support |
f4d17450 |
* Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 4.1.5.1-1
- Initial build. First version |