1 # TODO: review default login.defs
4 %bcond_without ldap # build without LDAP support
5 %bcond_without selinux # build without SELinux support
7 Summary: Utilities to manage the passwd and shadow user information
8 Summary(pl): Narzêdzia do zarz±dzania informacjami o u¿ytkownikach z passwd i shadow
13 Group: Applications/System
14 Source0: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/%{name}-%{version}.tar.bz2
15 # Source0-md5: 586ca4954b43e635aa659c2feb4c2edb
16 Source1: %{name}.useradd
17 Source2: %{name}.rpasswdd.init
18 Source3: %{name}.login.defs
25 Patch0: %{name}-f-option.patch
26 Patch1: %{name}-pl.po-update.patch
27 Patch2: %{name}-no_bash.patch
28 Patch3: %{name}-silent_crontab.patch
29 URL: http://www.thkukuk.de/pam/pwdutils/
30 BuildRequires: autoconf
31 BuildRequires: automake >= 1:1.7
32 BuildRequires: gcc >= 5:3.2
33 BuildRequires: gettext-devel
34 BuildRequires: libnscd-devel
35 %{?with_selinux:BuildRequires: libselinux-devel}
36 %{?with_ldap:BuildRequires: openldap-devel}
37 BuildRequires: openssl-devel >= 0.9.7d
38 BuildRequires: openslp-devel
39 BuildRequires: pam-devel
40 BuildRequires: sed >= 4.0
41 Provides: shadow = 2:%{version}-%{release}
42 Provides: shadow-extras = 2:%{version}-%{release}
44 Obsoletes: shadow-extras
45 Obsoletes: shadow-utils
46 Conflicts: util-linux < 2.12-10
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 # for pam module in /%{_lib}/security
50 %define _libdir /%{_lib}
53 pwdutils is a collection of utilities to manage the passwd and shadow
54 user information. The difference to the shadow suite is that these
55 utilities can also modify the information stored in NIS, NIS+, or
56 LDAP. PAM is used for user authentication and changing the pasword. It
57 contains passwd, chage, chfn, chsh, and a daemon for changing the
58 password on a remote machine over a secure SSL connection. The daemon
59 also uses PAM so that it can change passwords independent of where
63 pwdutils to zestaw narzêdzi do zarz±dzania informacjami o
64 u¿ytkownikach z passwd i shadow. Ró¿nica w stosunku do pakietu shadow
65 polega na tym, ¿e te narzêdzia mog± tak¿e modyfikowaæ informacje
66 zapisane w bazie NIS, NIS+ lub LDAP. PAM jest u¿ywany do
67 uwierzytelniania u¿ytkowników i zmiany hase³. Zestaw zawiera passwd,
68 chage, chfn, chsh oraz demona do zmiany has³a na zdalnej maszynie po
69 bezpiecznym po³±czeniu SSL. Demon tak¿e u¿ywa PAM, wiêc mo¿na zmieniaæ
70 has³a niezale¿nie od tego, gdzie s± przechowywane.
73 Summary: Remote password update daemon
74 Summary(pl): Demon do zdalnego uaktualniania hase³
75 Group: Applications/System
77 Requires(post,preun): /sbin/chkconfig
79 %description -n rpasswdd
80 rpasswdd is a daemon that lets users change their passwords in the
81 presence of a directory service like NIS, NIS+ or LDAP over a secure
82 SSL connection. rpasswdd behaves like the normal passwd(1) program and
83 uses PAM for authentication and changing the password, so it can be
84 configured very flexibel for the local requirements.
86 %description -n rpasswdd -l pl
87 rpasswdd to demon pozwalaj±cy u¿ytkownikom zmieniaæ has³a w obecno¶ci
88 us³ug katalogowych takich jak NIS, NIS+ czy LDAP po bezpiecznym
89 po³±czeniu SSL. rpasswdd zachowuje siê tak, jak normalny program
90 passwd(1) i u¿ywam PAM do uwierzytelniania i zmiany hase³, wiêc mo¿e
91 byæ bardzo elastycznie konfigurowany dla lokalnych wymagañ.
93 %package -n pam-pam_rpasswd
94 Summary: pam_rpasswd - PAM module to change remote password
95 Summary(pl): pam_rpasswd - modu³ PAM do zdalnej zmiany has³a
97 # rpasswd.conf is in base
98 Requires: %{name} = %{version}-%{release}
100 %description -n pam-pam_rpasswd
101 The pam_rpasswd PAM module is for changing the password of user
102 accounts on a remote server over a secure SSL connection. It only
103 provides functionality for one PAM management group: password
106 %description -n pam-pam_rpasswd -l pl
107 Modu³ PAM pam_rpasswd s³u¿y do zmiany hase³ dla kont u¿ytkowników na
108 zdalnym serwerze po bezpiecznym po³±czeniu SSL. Udostêpnia
109 funkcjonalno¶æ tylko dla jednej grupy zarz±dzania PAM: zmiany hase³.
120 sed -i -e 's/-Werror //' configure.in
129 --enable-pam_rpasswd \
130 --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
133 --%{?with_ldap:en}%{!?with_ldap:dis}able-ldap \
139 rm -rf $RPM_BUILD_ROOT
140 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pwdutils,security,skel}
143 DESTDIR=$RPM_BUILD_ROOT
145 mv -f $RPM_BUILD_ROOT%{_sbindir}/*.local $RPM_BUILD_ROOT%{_sysconfdir}/pwdutils
146 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/default/useradd
147 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpasswdd
148 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/login.defs
150 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/chage
151 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/chfn
152 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/chsh
153 install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/passwd
154 install %{SOURCE8} $RPM_BUILD_ROOT/etc/pam.d/useradd
155 install %{SOURCE9} $RPM_BUILD_ROOT/etc/pam.d/shadow
157 rm -f $RPM_BUILD_ROOT%{_libdir}/pwdutils/*.{la,a}
159 :> $RPM_BUILD_ROOT%{_sysconfdir}/shadow
160 :> $RPM_BUILD_ROOT/etc/security/chfn.allow
161 :> $RPM_BUILD_ROOT/etc/security/chsh.allow
166 rm -rf $RPM_BUILD_ROOT
169 if [ ! -f /etc/shadow ]; then
174 /sbin/chkconfig --add rpasswdd
175 if [ -f /var/lock/subsys/rpasswdd ]; then
176 /etc/rc.d/init.d/rpasswdd restart 1>&2
178 echo "Run \"/etc/rc.d/init.d/rpasswdd start\" to start rpasswdd daemon."
182 if [ "$1" = "0" ]; then
183 if [ -f /var/lock/subsys/rpasswdd ]; then
184 /etc/rc.d/init.d/rpasswdd stop 1>&2
186 /sbin/chkconfig --del rpasswdd
189 %files -f %{name}.lang
190 %defattr(644,root,root,755)
191 %doc ChangeLog NEWS README THANKS TODO
192 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/shadow
193 %attr(750,root,root) %dir %{_sysconfdir}/default
194 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/default/*
195 %attr(750,root,root) %dir %{_sysconfdir}/%{name}
196 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.local
197 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/logging
198 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/chage
199 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/chfn
200 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/chsh
201 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/passwd
202 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/useradd
203 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/shadow
204 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/login.defs
205 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/rpasswd.conf
206 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/chfn.allow
207 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/chsh.allow
209 %attr(755,root,root) %{_bindir}/chage
210 %attr(4755,root,root) %{_bindir}/chfn
211 %attr(4755,root,root) %{_bindir}/chsh
212 %attr(4755,root,root) %{_bindir}/expiry
213 %attr(4755,root,root) %{_bindir}/gpasswd
214 %attr(755,root,root) %{_bindir}/newgrp
215 %attr(4755,root,root) %{_bindir}/passwd
216 %attr(755,root,root) %{_bindir}/rpasswd
217 %attr(755,root,root) %{_bindir}/sg
218 %attr(755,root,root) %{_sbindir}/chpasswd
219 %attr(755,root,root) %{_sbindir}/groupadd
220 %attr(755,root,root) %{_sbindir}/groupdel
221 %attr(755,root,root) %{_sbindir}/groupmod
222 %attr(755,root,root) %{_sbindir}/grpconv
223 %attr(755,root,root) %{_sbindir}/grpck
224 %attr(755,root,root) %{_sbindir}/grpunconv
225 %attr(755,root,root) %{_sbindir}/pwconv
226 %attr(755,root,root) %{_sbindir}/pwck
227 %attr(755,root,root) %{_sbindir}/pwunconv
228 %attr(755,root,root) %{_sbindir}/rpasswdd
229 %attr(755,root,root) %{_sbindir}/useradd
230 %attr(755,root,root) %{_sbindir}/userdel
231 %attr(755,root,root) %{_sbindir}/usermod
232 %attr(755,root,root) %{_sbindir}/vigr
233 %attr(755,root,root) %{_sbindir}/vipw
234 %dir %{_libdir}/pwdutils
235 %attr(755,root,root) %{_libdir}/pwdutils/liblog_syslog.so*
237 %exclude %{_mandir}/man8/rpasswdd.8*
238 %exclude %{_mandir}/man8/pam_rpasswd.8*
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_sbindir}/rpasswdd
243 %attr(754,root,root) /etc/rc.d/init.d/rpasswdd
244 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/rpasswd
245 %{_mandir}/man8/rpasswdd.8*
247 %files -n pam-pam_rpasswd
248 %defattr(644,root,root,755)
249 %attr(755,root,root) /%{_lib}/security/pam_rpasswd.so
250 %{_mandir}/man8/pam_rpasswd.8*