Bitcoin Forum
May 27, 2024, 04:49:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Ubuntu sudo problem.  (Read 1060 times)
glub0x (OP)
Legendary
*
Offline Offline

Activity: 892
Merit: 1013



View Profile
June 07, 2013, 01:11:53 PM
 #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.



The cost of mediation increases transaction costs, limiting the
minimum practical transaction size and cutting off the possibility for small casual transactions

Satoshi Nakamoto : https://bitcoin.org/bitcoin.pdf
Welsh
Staff
Legendary
*
Offline Offline

Activity: 3276
Merit: 4111


View Profile
June 07, 2013, 01:14:38 PM
 #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.
glub0x (OP)
Legendary
*
Offline Offline

Activity: 892
Merit: 1013



View Profile
June 08, 2013, 10:56:43 AM
 #3

ok i'll do that

The cost of mediation increases transaction costs, limiting the
minimum practical transaction size and cutting off the possibility for small casual transactions

Satoshi Nakamoto : https://bitcoin.org/bitcoin.pdf
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!