Author

Topic: Ubuntu sudo problem. (Read 1079 times)

legendary
Activity: 892
Merit: 1013
June 08, 2013, 05:56:43 AM
#3
ok i'll do that
staff
Activity: 3304
Merit: 4115
June 07, 2013, 08:14:38 AM
#2
Would you be able to take pictures of the screen? I would be able to see what exactly is going on. I'm strange and can't work it out unless I can see it myself.
legendary
Activity: 892
Merit: 1013
June 07, 2013, 08:11:53 AM
#1
Hello, i've got a strange problem on Ubuntu lts with sudoers

Here it is :
I bought a usb block erupter so i want to configure my startup script to launch cgminer automatically.
The usb block erupter need some sudo right on cgminer to works so manually
i wrote a very simple asic.sh file :
./cgminer [blah blah]
 and it works just fine

Then i change my .sh file to
sudo ./cgminer [blah blah]

and i change visudo with that
worker-2 ALL=(ALL) NOPASSWD: ALL
(yeah i know not very secure but this is just for the exemple)

now i can start cgminer without entering my sudo password and it works.

The problem is that my boot script as commands like that:
gnome-terminal -x sh command1.sh &
gnome-terminal -x sh command2.sh &
gnome-terminal -x sh ~/cgminer-3.2.1/asic.sh

and this open 3 terminal BUT it ask for the password of worker-2. how is it even possible?

I changed asic.sh to add whoami before and it says that i am worker-2...
To sum up i change sudoers to give worker-2 all the rights without password ( and it works manually).
Then i launch a script on startup that need sudo (with worker-2)
and it asked me a password..


Not sure i am very clear.


Jump to: