|
Line
Link Here
|
| 0 |
-- a/service/realmd-altlinux-helper |
0 |
++ b/service/realmd-altlinux-helper |
|
Lines 13-18
Link Here
|
| 13 |
return $RETVAL |
13 |
return $RETVAL |
| 14 |
} |
14 |
} |
| 15 |
|
15 |
|
|
|
16 |
change_winbind_nsswitch() |
| 17 |
{ |
| 18 |
sed -E 's/(passwd:.*) winbind/\1/; s/(passwd:.*)/\1 winbind/;' -i /etc/nsswitch.conf || return |
| 19 |
sed -E 's/(group:.*) winbind/\1/; s/(group:.*)/\1 winbind/;' -i /etc/nsswitch.conf |
| 20 |
} |
| 21 |
|
| 22 |
rollback_winbind_nsswitch() |
| 23 |
{ |
| 24 |
sed -E 's/(passwd:.*) winbind/\1/;' -i /etc/nsswitch.conf || return |
| 25 |
sed -E 's/(group:.*) winbind/\1/;' -i /etc/nsswitch.conf |
| 26 |
} |
| 27 |
|
| 16 |
rollback_nsswitch() |
28 |
rollback_nsswitch() |
| 17 |
{ |
29 |
{ |
| 18 |
sed -E 's/(passwd:.*) sss/\1/;' -i /etc/nsswitch.conf |
30 |
sed -E 's/(passwd:.*) sss/\1/;' -i /etc/nsswitch.conf |
|
Lines 90-96
Link Here
|
| 90 |
return $RETVAL |
102 |
return $RETVAL |
| 91 |
} |
103 |
} |
| 92 |
|
104 |
|
|
|
105 |
enable_winbind() |
| 106 |
{ |
| 107 |
change_winbind_nsswitch || return |
| 108 |
control system-auth winbind || return |
| 109 |
reexecute_daemon |
| 110 |
} |
| 111 |
|
| 112 |
disable_winbind() |
| 113 |
{ |
| 114 |
rollback_winbind_nsswitch || return |
| 115 |
control system-auth local || return |
| 116 |
reexecute_daemon |
| 117 |
} |
| 118 |
|
| 93 |
case "$1" in |
119 |
case "$1" in |
|
|
120 |
enable-winbind) |
| 121 |
enable_winbind |
| 122 |
RETVAL=$? |
| 123 |
;; |
| 124 |
disable-winbind) |
| 125 |
disable_winbind |
| 126 |
RETVAL=$? |
| 127 |
;; |
| 94 |
enable) |
128 |
enable) |
| 95 |
enable |
129 |
enable |
| 96 |
;; |
130 |
;; |
|
Lines 98-104
Link Here
|
| 98 |
disable |
132 |
disable |
| 99 |
;; |
133 |
;; |
| 100 |
*) |
134 |
*) |
| 101 |
echo "${0##*/} {enable|disable}" |
135 |
echo "${0##*/} {enable|disable|enable-winbind|disable-winbind}" |
| 102 |
RETVAL=1 |
136 |
RETVAL=1 |
| 103 |
esac |
137 |
esac |
| 104 |
|
138 |
|
| 105 |
-- a/service/realmd-altlinux.conf |
139 |
++ b/service/realmd-altlinux.conf |
|
Lines 33-40
Link Here
|
| 33 |
freeipa-client = /usr/sbin/ipa-client-install |
33 |
freeipa-client = /usr/sbin/ipa-client-install |
| 34 |
|
34 |
|
| 35 |
[commands] |
35 |
[commands] |
| 36 |
winbind-enable-logins = /usr/sbin/control system-auth winbind |
36 |
winbind-enable-logins = /usr/lib/realmd/realmd-altlinux-helper enable-winbind |
| 37 |
winbind-disable-logins = /usr/sbin/control system-auth local |
37 |
winbind-disable-logins = /usr/lib/realmd/realmd-altlinux-helper disable-winbind |
| 38 |
winbind-enable-service = /sbin/chkconfig winbind on |
38 |
winbind-enable-service = /sbin/chkconfig winbind on |
| 39 |
winbind-disable-service = /sbin/chkconfig winbind off |
39 |
winbind-disable-service = /sbin/chkconfig winbind off |
| 40 |
winbind-restart-service = /sbin/service winbind restart |
40 |
winbind-restart-service = /sbin/service winbind restart |