author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sat, 14 Apr 2012 13:56:41 +0300 | |
changeset 1259 | c7069f501ce1 |
parent 899 | 7b4265c8d324 |
permissions | -rw-r--r-- |
899
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
1 |
-*- mode: outline; coding: utf-8 -*- |
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
2 |
|
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
3 |
* Stop sudo asking for password. |
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
4 |
|
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
5 |
username ALL =(ALL) NOPASSWD: ALL |
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
6 |
|
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
7 |
or |
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
8 |
|
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
9 |
@group ALL =(ALL) NOPASSWD: ALL |
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
10 |
|
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
11 |
* Change user/primary group for executed command. |
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
12 |
|
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
13 |
$ sudo -u $user -g $group $command |
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
14 |
|
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
15 |
To allow this plase in /etc/sudoers: |
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
16 |
|
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
17 |
username ALL =(ALL:ALL) NOPASSWD: ALL |
7b4265c8d324
Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
889
diff
changeset
|
18 |