Hi,
ich möchte als unprivilegierter User in der Lage sein Bluetooth an / aus zu schalten. Dazu habe ich folgendes mini-script:
/usr/bin/bluetoothctl
Ich habe also das SUID bit und "root" als Owner gesetzt:
Allerdings bekommt ich immernoch permission denied:
Ich verstehe nicht wieso ... Sollte doch eigentlich also root laufen!?!?!
cu
serow
ich möchte als unprivilegierter User in der Lage sein Bluetooth an / aus zu schalten. Dazu habe ich folgendes mini-script:
/usr/bin/bluetoothctl
Code:
#!/bin/bash
if [ "$1" = "on" ]; then
echo "on"
echo 1 > /sys/devices/platform/thinkpad_acpi/bluetooth_enable
fi
if [ "$1" = "off" ]; then
echo "off"
echo 0 > /sys/devices/platform/thinkpad_acpi/bluetooth_enable
fi
Ich habe also das SUID bit und "root" als Owner gesetzt:
Code:
mathias@apprentice:~$ ls -l /usr/bin/bluetoothctl
-rwsr-xr-x 1 root root 222 2009-04-11 11:00 /usr/bin/bluetoothctl
mathias@apprentice:~$
Allerdings bekommt ich immernoch permission denied:
Code:
mathias@apprentice:~$ id
uid=1000(mathias) gid=1000(mathias) groups=20(dialout),24(cdrom),25(floppy),29(audio),44(video),46(plugdev),111(netdev),116(powerdev),1000(mathias)
mathias@apprentice:~$ bluetoothctl off
off
/usr/bin/bluetoothctl: line 10: /sys/devices/platform/thinkpad_acpi/bluetooth_enable: Permission denied
mathias@apprentice:~$
Ich verstehe nicht wieso ... Sollte doch eigentlich also root laufen!?!?!
cu
serow