1

I'm using bluetooth on linux to access internet via dialup from my Nokia S60 phone. I've gotten the connection to work just fine, but there's still one recurring problem:

Some Nokia S60 phones, mine included, have the habit of changing the channel they offer their Dial-Up Networking service on. One day it's 2, the next day it may be switched to 9. For linux, this means that each time it happens I have to go edit the /etc/bluetooth/rfcomm.conf to contain the right channel and then use "/etc/init.d/bluetooth restart" to reboot the bluetooth service.

I've created a script to do all this for me, and granted edit rights to the rfcomm.conf - but restarting the bluetooth service still needs super-user rights. I'd rather not have to type my password every time the phone feels a need to juggle channels, so:

How do I grant the user access to restart the bluetooth service? Preferably without breaking too much of my access control - so granting the user full root-level access is not a solution. :)

1 Answer 1

3

Add

Cmnd_Alias BT=/etc/init.d/bluetooth
username ALL=NOPASSWD: BT

to your /etc/sudoers file. Don't forget to change username though :)

This will allow you to run sudo /etc/init.d/bluetooth restart without entering the password but sudo will still ask for it when you run it with any other application.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .