1 | Summary: scripts.mit.edu locker administration system |
---|
2 | Group: Applications/System |
---|
3 | Name: accountadm |
---|
4 | Version: 0.00 |
---|
5 | Release: 0 |
---|
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} |
---|
12 | Prereq: /usr/bin/fs, /usr/bin/pts |
---|
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 |
---|
27 | ./configure --with-fs=/usr/bin/fs --with-pts=/usr/bin/pts |
---|
28 | make |
---|
29 | |
---|
30 | %install |
---|
31 | [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT |
---|
32 | make install DESTDIR=$RPM_BUILD_ROOT prefix=/usr/local |
---|
33 | |
---|
34 | %clean |
---|
35 | [ $RPM_BUILD_ROOT != / ] && rm -rf $RPM_BUILD_ROOT |
---|
36 | |
---|
37 | %files |
---|
38 | %defattr(0644, root, root) |
---|
39 | /usr/local/etc/mbashrc |
---|
40 | %defattr(0755, root, root) |
---|
41 | /usr/local/bin/mbash |
---|
42 | /usr/local/bin/admof |
---|
43 | /usr/local/sbin/ssh-admof |
---|
44 | /usr/local/sbin/signup-scripts-backend |
---|
45 | %defattr(4755, signup, signup) |
---|
46 | /usr/local/sbin/signup-scripts-frontend |
---|
47 | |
---|
48 | %pre |
---|
49 | groupadd -g 102 signup |
---|
50 | useradd -u 102 -g signup -d /afs/athena.mit.edu/contrib/scripts/signup signup |
---|
51 | |
---|
52 | %post |
---|
53 | cat >>/etc/sudoers <<END |
---|
54 | signup ALL=(root) NOPASSWD: /usr/sbin/useradd |
---|
55 | signup ALL=(root) NOPASSWD: /usr/sbin/groupadd |
---|
56 | signup ALL=(root) NOPASSWD: /usr/sbin/setquota |
---|
57 | END |
---|
58 | chmod 0440 /etc/sudoers |
---|
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 |
---|
67 | userdel -r signup |
---|
68 | |
---|
69 | %changelog |
---|
70 | |
---|
71 | * Sat Sep 30 2006 Jeff Arnold <jbarnold@MIT.EDU> 0.00 |
---|
72 | - prerelease |
---|