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