View Single Post
Posts: 515 | Thanked: 193 times | Joined on Oct 2009
#14
Originally Posted by 9000 View Post
Your valuable suggestion pointed out what was missing from the procedures:

1) Install pc-connectivity-manager
2) The script cannot be created under notepad, it should be done directly under xterminal
3) Setup sudoers

For 1) I've installed pc-connectivity-manager long time ago, I didn't realize it may be essential to the bluetooth PAN. I added it back in procedure.

For 2) notepad would introduce some ^M characters in the transfer.

It doesn't matter. I've attached a tarball which contain the script bluetooth-pan.sh. You can download the tarball, put it under /home/user/, run the following command to extract it:

Code:
tar xvf bluetooth-pan.tar
then cat /home/user/bluetooth-pan.sh, you should see the content.

For 3) I found that sudoers might not by default having all the privilege granted to user. That's good, as it's more secure. Therefore, you might need to add the following files bluetooth-pan.sudoers under the /etc/sudoers/ (as root)

Code:
user ALL = NOPASSWD: /home/user/bluetooth-pan.sh
and then update the sudoers as root:
Code:
update-sudoers
I've also attached this file in the tarball.

The above has been updated in the procedures.

Thank you for your suggestion. Please let me know when you've further query.
Thats great, thanks v v much for the help.

So I have installed the pc-connectivity manager, put the tar in /home/user and extracted it in terminal as you instructed.

I then try this command: chmod u+x /home/user/bluetooth-pan.sh

but it doesnt seem to 'do' anything. I tried it as root and not as root.

Also when I try the next command (as root):

user ALL = NOPASSWD: /home/user/bluetooth-pan.sh

it says /bin/sh: user: not found

Does that mean anything to you!?