/[smeserver]/rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-unix-cleanup.patch
ViewVC logotype

Contents of /rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-unix-cleanup.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Fri Nov 5 19:02:54 2010 UTC (14 years ago) by slords
Branch: MAIN
CVS Tags: e-smith-ldap-5_2_0-76_el5_sme, e-smith-ldap-5_2_0-71_el5_sme, e-smith-ldap-5_2_0-77_el5_sme, e-smith-ldap-5_2_0-78_el5_sme, e-smith-ldap-5_2_0-66_el5_sme, e-smith-ldap-5_2_0-70_el5_sme, e-smith-ldap-5_2_0-79_el5_sme, e-smith-ldap-5_2_0-81_el5_sme, e-smith-ldap-5_2_0-75_el5_sme, e-smith-ldap-5_2_0-73_el5_sme, e-smith-ldap-5_2_0-69_el5_sme, e-smith-ldap-5_2_0-72_el5_sme, e-smith-ldap-5_2_0-65_el5_sme, e-smith-ldap-5_2_0-80_el5_sme, e-smith-ldap-5_2_0-74_el5_sme, e-smith-ldap-5_2_0-63_el5_sme, e-smith-ldap-5_2_0-62_el5_sme, e-smith-ldap-5_2_0-68_el5_sme, e-smith-ldap-5_2_0-67_el5_sme, e-smith-ldap-5_2_0-64_el5_sme, HEAD
Changes since 1.1: +2 -2 lines
Error occurred while calculating annotation data.
* Fri Nov 5 2010 Shad L. Lords <slords@mail.com> 5.2.0-62.sme
- Adjust call to ldap-update later create/modify/delete [SME: 6284]

1 diff -up e-smith-ldap-5.2.0/createlinks.unix-cleanup e-smith-ldap-5.2.0/createlinks
2 --- e-smith-ldap-5.2.0/createlinks.unix-cleanup 2010-11-02 09:15:20.000000000 -0600
3 +++ e-smith-ldap-5.2.0/createlinks 2010-11-02 09:14:30.000000000 -0600
4 @@ -30,6 +30,7 @@ event_link("ldap-update", "ibay-modify",
5 event_link("ldap-delete", "ibay-delete", "55");
6
7 event_link("ldap-update", "bootstrap-ldap-save", "25");
8 +event_link("cleanup-unix-user-group", "bootstrap-ldap-save", "98");
9
10 event_link("ldap-update", "machine-account-create", "95");
11
12 diff -up e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/cleanup-unix-user-group.unix-cleanup e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/cleanup-unix-user-group
13 --- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/cleanup-unix-user-group.unix-cleanup 2010-11-02 09:13:34.000000000 -0600
14 +++ e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/cleanup-unix-user-group 2010-11-02 09:13:20.000000000 -0600
15 @@ -0,0 +1,20 @@
16 +#!/bin/bash -e
17 +
18 +ldapauth=$(/sbin/e-smith/config getprop ldap Authentication || echo disabled)
19 +
20 +# Exit unless ldap auth is enabled
21 +[ "$ldapauth" == "enabled" ] || exit 0
22 +
23 +# Users and group accounts are now stored in LDAP, so we need to delete them
24 +# from the old passwd / group / shadow database
25 +
26 +for USER in $(/usr/bin/getent passwd | sort | cut -d':' -f1 | uniq -d); do
27 + /usr/sbin/luserdel -G $USER
28 +done
29 +
30 +for GROUP in $(/usr/bin/getent group | sort | cut -d':' -f1 | uniq -d); do
31 + /usr/sbin/lgroupdel $GROUP
32 +done
33 +
34 +# And add the admin back in the root group, which is not in the LDAP database
35 +/usr/bin/gpasswd -a admin root

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed