initial commit of file from CVS for smeserver-remoteuseraccess on Sat Sep 7 21:00:51 AEST 2024
This commit is contained in:
3
root/etc/e-smith/templates/etc/sudoers/10root
Normal file
3
root/etc/e-smith/templates/etc/sudoers/10root
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
root ALL=(ALL) ALL
|
||||
|
22
root/etc/e-smith/templates/etc/sudoers/20users
Normal file
22
root/etc/e-smith/templates/etc/sudoers/20users
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
my %accounts;
|
||||
tie %accounts, 'esmith::config', '/home/e-smith/db/accounts';
|
||||
|
||||
my $key;
|
||||
my $value;
|
||||
my $result = "";
|
||||
|
||||
while (($key,$value) = each %accounts)
|
||||
{
|
||||
my ($type, %properties) = split (/\|/, $value, -1);
|
||||
if ($type eq 'user')
|
||||
{
|
||||
if (defined($properties{'Sudoer'}) && $properties{'Sudoer'} eq 'yes')
|
||||
{
|
||||
$result .= "$key ALL=(ALL) ALL\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$result;
|
||||
}
|
Reference in New Issue
Block a user