del-adm doit retourner 0 si adm n'est pas dans /etc/group
darcs-hash:20080209175512-41f88-c23cf795ea3cae7f54b1addaad6deee05f5025a3.gz
This commit is contained in:
parent
37522bca30
commit
1e7f6a5310
2 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
# -*- mode: python; coding: utf-8 -*-
|
||||
|
||||
include("mode/space")
|
||||
include("ip")
|
||||
|
||||
header("Acces a la base ldap")
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
<!-- Suppression du groupe adm de /etc/group pour forcer sudo à regarder dans la base -->
|
||||
<Action name="del-adm"
|
||||
timing="post" when="modified" status="check"
|
||||
command="grep -q '^adm:' /etc/group &&
|
||||
a=$(mktemp) &&
|
||||
command="! grep -q '^adm:' /etc/group ||
|
||||
{ a=$(mktemp) &&
|
||||
awk -F':' '$1 != "adm"' /etc/group > $a &&
|
||||
mv $a /etc/group &&
|
||||
rm -f $a &&
|
||||
grpconv"/>
|
||||
grpconv; }"/>
|
||||
</Rules>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue