Quote:...emerge-* rather than gentoo-*...
Doh! Yeah thanks I've fixed that!
Quote:Also, in order for the script to work you DO have to be a member of the portage group
Yup and I agree it is a security risk on a multiuser system. You ask a way around it, the answer to that would be
sudo.
Sudo is very capable at providing access to a single command for a single purpose. So you will need to install sudo first (gentoo is missing sudo by default).
Code:
# emerge app-admin/sudo
Then for your sudoers file (edited with
visudo) do:
Code:
User_Alias GENLOP = znx, dragon, enigma
GENLOP ALL=(%portage) NOPASSWD: /usr/bin/genlop -lnu
Now with that in there, you can do this as any of the listed GENLOP users:
Code:
$ sudo -u portage /usr/bin/genlop -lnu
Bing, works! So now it can act in the script. The good thing about this is that I particularly restricted the command to a set option, this in effect ensures that its only that command that the user runs. I should point out that whilst sudo is more secure than having a group but its still not perfect and never treat it as :)
Ok, so MANY thanks dragon, you debugged my howto! yay