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 URL: http://www.thkukuk.de/pam/pwdutils/
28 BuildRequires: autoconf
29 BuildRequires: automake >= 1:1.7
30 BuildRequires: gcc >= 5:3.2
31 BuildRequires: gettext-devel
32 BuildRequires: libnscd-devel
33 %{?with_selinux:BuildRequires: libselinux-devel}
34 %{?with_ldap:BuildRequires: openldap-devel}
35 BuildRequires: openssl-devel >= 0.9.7d
36 BuildRequires: openslp-devel
37 BuildRequires: pam-devel
38 BuildRequires: sed >= 4.0
39 Provides: shadow = 2:%{version}-%{release}
40 Provides: shadow-extras = 2:%{version}-%{release}
42 Obsoletes: shadow-extras
43 Obsoletes: shadow-utils
44 Conflicts: util-linux < 2.12-10
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 # for pam module in /%{_lib}/security
48 %define _libdir /%{_lib}
51 pwdutils is a collection of utilities to manage the passwd and shadow
52 user information. The difference to the shadow suite is that these
53 utilities can also modify the information stored in NIS, NIS+, or
54 LDAP. PAM is used for user authentication and changing the pasword. It
55 contains passwd, chage, chfn, chsh, and a daemon for changing the
56 password on a remote machine over a secure SSL connection. The daemon
57 also uses PAM so that it can change passwords independent of where
61 pwdutils to zestaw narzêdzi do zarz±dzania informacjami o
62 u¿ytkownikach z passwd i shadow. Ró¿nica w stosunku do pakietu shadow
63 polega na tym, ¿e te narzêdzia mog± tak¿e modyfikowaæ informacje
64 zapisane w bazie NIS, NIS+ lub LDAP. PAM jest u¿ywany do
65 uwierzytelniania u¿ytkowników i zmiany hase³. Zestaw zawiera passwd,
66 chage, chfn, chsh oraz demona do zmiany has³a na zdalnej maszynie po
67 bezpiecznym po³±czeniu SSL. Demon tak¿e u¿ywa PAM, wiêc mo¿na zmieniaæ
68 has³a niezale¿nie od tego, gdzie s± przechowywane.
71 Summary: Remote password update daemon
72 Summary(pl): Demon do zdalnego uaktualniania hase³
73 Group: Applications/System
75 Requires(post,preun): /sbin/chkconfig
77 %description -n rpasswdd
78 rpasswdd is a daemon that lets users change their passwords in the
79 presence of a directory service like NIS, NIS+ or LDAP over a secure
80 SSL connection. rpasswdd behaves like the normal passwd(1) program and
81 uses PAM for authentication and changing the password, so it can be
82 configured very flexibel for the local requirements.
84 %description -n rpasswdd -l pl
85 rpasswdd to demon pozwalaj±cy u¿ytkownikom zmieniaæ has³a w obecno¶ci
86 us³ug katalogowych takich jak NIS, NIS+ czy LDAP po bezpiecznym
87 po³±czeniu SSL. rpasswdd zachowuje siê tak, jak normalny program
88 passwd(1) i u¿ywam PAM do uwierzytelniania i zmiany hase³, wiêc mo¿e
89 byæ bardzo elastycznie konfigurowany dla lokalnych wymagañ.
91 %package -n pam-pam_rpasswd
92 Summary: pam_rpasswd - PAM module to change remote password
93 Summary(pl): pam_rpasswd - modu³ PAM do zdalnej zmiany has³a
95 # rpasswd.conf is in base
96 Requires: %{name} = %{version}-%{release}
98 %description -n pam-pam_rpasswd
99 The pam_rpasswd PAM module is for changing the password of user
100 accounts on a remote server over a secure SSL connection. It only
101 provides functionality for one PAM management group: password
104 %description -n pam-pam_rpasswd -l pl
105 Modu³ PAM pam_rpasswd s³u¿y do zmiany hase³ dla kont u¿ytkowników na
106 zdalnym serwerze po bezpiecznym po³±czeniu SSL. Udostêpnia
107 funkcjonalno¶æ tylko dla jednej grupy zarz±dzania PAM: zmiany hase³.
116 sed -i -e 's/-Werror //' configure.in
125 --enable-pam_rpasswd \
126 --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
129 --%{?with_ldap:en}%{!?with_ldap:dis}able-ldap \
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pwdutils,security,skel}
139 DESTDIR=$RPM_BUILD_ROOT
141 mv -f $RPM_BUILD_ROOT%{_sbindir}/*.local $RPM_BUILD_ROOT%{_sysconfdir}/pwdutils
142 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/default/useradd
143 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpasswdd
144 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/login.defs
146 install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/chage
147 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/chfn
148 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/chsh
149 install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/passwd
150 install %{SOURCE8} $RPM_BUILD_ROOT/etc/pam.d/useradd
151 install %{SOURCE9} $RPM_BUILD_ROOT/etc/pam.d/shadow
153 rm -f $RPM_BUILD_ROOT%{_libdir}/pwdutils/*.{la,a}
155 :> $RPM_BUILD_ROOT%{_sysconfdir}/shadow
156 :> $RPM_BUILD_ROOT/etc/security/chfn.allow
157 :> $RPM_BUILD_ROOT/etc/security/chsh.allow
162 rm -rf $RPM_BUILD_ROOT
165 if [ ! -f /etc/shadow ]; then
170 /sbin/chkconfig --add rpasswdd
171 if [ -f /var/lock/subsys/rpasswdd ]; then
172 /etc/rc.d/init.d/rpasswdd restart 1>&2
174 echo "Run \"/etc/rc.d/init.d/rpasswdd start\" to start rpasswdd daemon."
178 if [ "$1" = "0" ]; then
179 if [ -f /var/lock/subsys/rpasswdd ]; then
180 /etc/rc.d/init.d/rpasswdd stop 1>&2
182 /sbin/chkconfig --del rpasswdd
185 %files -f %{name}.lang
186 %defattr(644,root,root,755)
187 %doc ChangeLog NEWS README THANKS TODO
188 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/shadow
189 %attr(750,root,root) %dir %{_sysconfdir}/default
190 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/default/*
191 %attr(750,root,root) %dir %{_sysconfdir}/%{name}
192 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.local
193 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/logging
194 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/chage
195 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/chfn
196 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/chsh
197 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/passwd
198 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/useradd
199 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/shadow
200 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/login.defs
201 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/rpasswd.conf
202 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/chfn.allow
203 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/chsh.allow
205 %attr(755,root,root) %{_bindir}/chage
206 %attr(4755,root,root) %{_bindir}/chfn
207 %attr(4755,root,root) %{_bindir}/chsh
208 %attr(4755,root,root) %{_bindir}/expiry
209 %attr(4755,root,root) %{_bindir}/gpasswd
210 %attr(755,root,root) %{_bindir}/newgrp
211 %attr(4755,root,root) %{_bindir}/passwd
212 %attr(755,root,root) %{_bindir}/rpasswd
213 %attr(755,root,root) %{_bindir}/sg
214 %attr(755,root,root) %{_sbindir}/chpasswd
215 %attr(755,root,root) %{_sbindir}/groupadd
216 %attr(755,root,root) %{_sbindir}/groupdel
217 %attr(755,root,root) %{_sbindir}/groupmod
218 %attr(755,root,root) %{_sbindir}/grpconv
219 %attr(755,root,root) %{_sbindir}/grpck
220 %attr(755,root,root) %{_sbindir}/grpunconv
221 %attr(755,root,root) %{_sbindir}/pwconv
222 %attr(755,root,root) %{_sbindir}/pwck
223 %attr(755,root,root) %{_sbindir}/pwunconv
224 %attr(755,root,root) %{_sbindir}/rpasswdd
225 %attr(755,root,root) %{_sbindir}/useradd
226 %attr(755,root,root) %{_sbindir}/userdel
227 %attr(755,root,root) %{_sbindir}/usermod
228 %attr(755,root,root) %{_sbindir}/vigr
229 %attr(755,root,root) %{_sbindir}/vipw
230 %dir %{_libdir}/pwdutils
231 %attr(755,root,root) %{_libdir}/pwdutils/liblog_syslog.so*
233 %exclude %{_mandir}/man8/rpasswdd.8*
234 %exclude %{_mandir}/man8/pam_rpasswd.8*
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_sbindir}/rpasswdd
239 %attr(754,root,root) /etc/rc.d/init.d/rpasswdd
240 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/rpasswd
241 %{_mandir}/man8/rpasswdd.8*
243 %files -n pam-pam_rpasswd
244 %defattr(644,root,root,755)
245 %attr(755,root,root) /%{_lib}/security/pam_rpasswd.so
246 %{_mandir}/man8/pam_rpasswd.8*