harisund
January 10th, 2006, 04:59 AM
Don't worry. I am not asking the standard sudo question.
I just noticed one thing, if in a script titled "install" I have
sudo apt-get install $1 > packages
and I do ./install packagename (after chmod u+x install) it doesn't allow me to
but if I simply have
apt-get install $1 > packages
and I do sudo ./install packagename
it works?
Is this how sudo works? I have authenticated myself with the NOPASSWD option in the sudoers file, and want to avoid typing sudo everytime (since not every time tab completion works and other stuff) and instead want the sudo to be in a script. I am not able to get that to work.
However, if I call the script with sudo , it runs..
Anybody knows a way I can avoid sudo all together?
Thanks !
I just noticed one thing, if in a script titled "install" I have
sudo apt-get install $1 > packages
and I do ./install packagename (after chmod u+x install) it doesn't allow me to
but if I simply have
apt-get install $1 > packages
and I do sudo ./install packagename
it works?
Is this how sudo works? I have authenticated myself with the NOPASSWD option in the sudoers file, and want to avoid typing sudo everytime (since not every time tab completion works and other stuff) and instead want the sudo to be in a script. I am not able to get that to work.
However, if I call the script with sudo , it runs..
Anybody knows a way I can avoid sudo all together?
Thanks !