author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Wed, 20 Jul 2011 10:51:44 +0300 | |
changeset 897 | b4d7d3091494 |
parent 889 | f18e156d1549 |
child 899 | 7b4265c8d324 |
permissions | -rwxr-xr-x |
862
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
-*- mode: outline; coding: utf-8 -*- |
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
* Stop sudo asking for password. |
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
|
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
username ALL =(ALL) NOPASSWD: ALL |
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
|
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
7 |
or |
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
|
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
@group ALL =(ALL) NOPASSWD: ALL |
b539dd85bbf3
Stop sudo asking for password.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
|
889
f18e156d1549
Change user/primary group for executed command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
862
diff
changeset
|
11 |
* Change user/primary group for executed command. |
f18e156d1549
Change user/primary group for executed command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
862
diff
changeset
|
12 |
|
f18e156d1549
Change user/primary group for executed command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
862
diff
changeset
|
13 |
$ sudo -u $user -g $group $command |
f18e156d1549
Change user/primary group for executed command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
862
diff
changeset
|
14 |
|
f18e156d1549
Change user/primary group for executed command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
862
diff
changeset
|
15 |
To allow this plase in /etc/sudoers: |
f18e156d1549
Change user/primary group for executed command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
862
diff
changeset
|
16 |
|
f18e156d1549
Change user/primary group for executed command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
862
diff
changeset
|
17 |
username ALL =(ALL:ALL) NOPASSWD: ALL |
f18e156d1549
Change user/primary group for executed command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
862
diff
changeset
|
18 |