1 |
Holly Bostick wrote: |
2 |
|
3 |
>>I don't just give myself blanket permissions to sudo to all commands; I |
4 |
>>made a Cmd_Alias group which includes a lot of utility apps. And, like |
5 |
>>many of you, I included emerge in this group. |
6 |
>> |
7 |
> |
8 |
|
9 |
|
10 |
>Christoph Gysin schreef: |
11 |
> |
12 |
> |
13 |
>> |
14 |
>>$ sudo bash -c "echo package ~x86 >> /etc/portage/package.keywords" |
15 |
>> |
16 |
>>will run the redirection as root. |
17 |
>> |
18 |
>>For stuff like this, I'd recommend you to write simple shell functions: |
19 |
>> |
20 |
>>addkeyword(){ |
21 |
>> sudo bash -c "echo $* >> /etc/portage/package.keywords" |
22 |
>>} |
23 |
>> |
24 |
>>Write them in your .bashrc and their avaible when you need it. |
25 |
>> |
26 |
>>Use it like this: |
27 |
>> |
28 |
>>$ addkeyword package ~x86 |
29 |
>> |
30 |
>>Christoph |
31 |
>> |
32 |
>> |
33 |
> |
34 |
>Thank you, Christoph!!!! |
35 |
> |
36 |
>You have not only saved my sanity, but you've given me a solution to two |
37 |
>problems you didn't even know I had (it was the next question)! i.e., |
38 |
> |
39 |
> |
40 |
|
41 |
BTW Holly, |
42 |
|
43 |
You should recognize that from a security standpoint allowing yourself |
44 |
to execute bash is really giving yourself "blanket permissions to sudo |
45 |
to all commands". You might as well make life easier on yourself and |
46 |
just make your sudo settings "ALL=(ALL) NOPASSWD: ALL". |
47 |
|
48 |
My $.02. |
49 |
|
50 |
-Richard |
51 |
|
52 |
-- |
53 |
gentoo-user@g.o mailing list |