[1] | 1 | Summary: scripts.mit.edu locker administration system |
---|
| 2 | Group: Applications/System |
---|
[67] | 3 | Name: accountadm |
---|
[1] | 4 | Version: 0.00 |
---|
[120] | 5 | Release: 0 |
---|
[1] | 6 | Vendor: The scripts.mit.edu Team (scripts@mit.edu) |
---|
| 7 | URL: http://scripts.mit.edu |
---|
| 8 | License: GPL |
---|
| 9 | Source: %{name}.tar.gz |
---|
| 10 | BuildRoot: %{_tmppath}/%(%{__id_u} -n)-%{name}-%{version}-root |
---|
| 11 | %define debug_package %{nil} |
---|
[36] | 12 | Prereq: /usr/bin/fs, /usr/bin/pts |
---|
[1] | 13 | |
---|
| 14 | %description |
---|
| 15 | |
---|
| 16 | scripts.mit.edu locker administration system |
---|
| 17 | Contains: |
---|
| 18 | - Perl script for checking whether a user is a locker admin <admof> |
---|
| 19 | - setuid C program used to start a signup request <signup-scripts-frontend> |
---|
| 20 | - Perl script that handles signup requests <signup-scripts-backend> |
---|
| 21 | See http://scripts.mit.edu/wiki for more information. |
---|
| 22 | |
---|
| 23 | %prep |
---|
| 24 | %setup -q -n %{name} |
---|
| 25 | |
---|
| 26 | %build |
---|
[36] | 27 | ./configure --with-fs=/usr/bin/fs --with-pts=/usr/bin/pts |
---|
[1] | 28 | make |
---|
| 29 | |
---|
| 30 | %install |
---|
| 31 | [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT |
---|
[89] | 32 | make install DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local |
---|
[1] | 33 | |
---|
| 34 | %clean |
---|
| 35 | [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT |
---|
| 36 | |
---|
| 37 | %files |
---|
| 38 | %defattr(0644, root, root) |
---|
[134] | 39 | /usr/local/etc/mbashrc |
---|
[1] | 40 | %defattr(0755, root, root) |
---|
[134] | 41 | /usr/local/bin/mbash |
---|
[125] | 42 | /usr/local/bin/admof |
---|
| 43 | /usr/local/sbin/ssh-admof |
---|
[1] | 44 | /usr/local/sbin/signup-scripts-backend |
---|
| 45 | %defattr(4755, signup, signup) |
---|
| 46 | /usr/local/sbin/signup-scripts-frontend |
---|
| 47 | |
---|
| 48 | %pre |
---|
[392] | 49 | groupadd -g 102 signup || [ $? -eq 9 ] |
---|
| 50 | useradd -u 102 -g signup -d /afs/athena.mit.edu/contrib/scripts/signup -M signup || [ $? -eq 9 ] |
---|
[1] | 51 | |
---|
| 52 | %post |
---|
| 53 | cat >>/etc/sudoers <<END |
---|
| 54 | signup ALL=(root) NOPASSWD: /usr/sbin/useradd |
---|
| 55 | signup ALL=(root) NOPASSWD: /usr/sbin/groupadd |
---|
[11] | 56 | signup ALL=(root) NOPASSWD: /usr/sbin/setquota |
---|
[1] | 57 | END |
---|
[11] | 58 | chmod 0440 /etc/sudoers |
---|
[1] | 59 | |
---|
| 60 | %preun |
---|
| 61 | touch /etc/sudoers.tmp |
---|
| 62 | chmod 600 /etc/sudoers.tmp |
---|
| 63 | grep -v "^signup" /etc/sudoers > /etc/sudoers.tmp |
---|
| 64 | mv /etc/sudoers.tmp /etc/sudoers |
---|
| 65 | |
---|
| 66 | %postun |
---|
[171] | 67 | userdel signup |
---|
[1] | 68 | |
---|
| 69 | %changelog |
---|
| 70 | |
---|
| 71 | * Sat Sep 30 2006 Jeff Arnold <jbarnold@MIT.EDU> 0.00 |
---|
| 72 | - prerelease |
---|