PDA

View Full Version : [ubuntu] how to make bash script not ask for password?


-random
June 19th, 2008, 06:06 AM
hello.. i've made a bash script that uses a sudo command, so everytime i run the script it asks for a password,

> how can i make it so that it doesn't ask for a password? <

(for example when you click on quit > restart, it doesn't ask for a password)

x-scuze my engliszh lol

dark_harmonics
June 19th, 2008, 06:25 AM
If you trust the script then you can remove all sudos from it and just run it as root to begin with. Sudo ./script.sh

kaiju
June 19th, 2008, 07:11 AM
hello.. i've made a bash script that uses a sudo command, so everytime i run the script it asks for a password...

based on what it looks like you are trying to achieve, you might find this thread (http://ubuntuforums.org/showthread.php?t=342763) useful. or you could use gksudo for a password box.

-random
June 19th, 2008, 08:09 AM
awesome thnkx guys i'll give it a shot and report what i did a.s.a.p.

(gonna watch narnia now with the gf bleh.. ;P)