Ask Your Question
2

Blueman on startup asks for authentication twice

asked 2018-11-10 07:45:49 -0600

ET gravatar image

updated 2018-11-10 09:08:50 -0600

I installed Blueman to setup my Bluetooth mouse, and it seems to work all fine, though, when I start Fedora, it asks me to enter my password twice, once for configuring the network, and the other time for changing the RfKill State. This can be a bit annoying, and I want to make sure that the authentications on startup do not appear.

I made the following edits, but it still appears:

/lib/udev/rules.d/50-bluetooth-hci-auto-poweron.rules:

# /lib/udev/rules.d/50-bluetooth-hci-auto-poweron.rules

# Set bluetooth power up
ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="/bin/hciconfig %k up"

/etc/polkit-1/rules.d/81-blueman.rules:

# /etc/polkit-1/rules.d/81-blueman.rules

# Rule to relax polkit and remove the two auth steps on startup
polkit.addRule(function(action, subject) {
    if (action.id == "org.blueman.rfkill.setstate" && subject.local && subject.active && subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
    if (action.id == "org.blueman.network.setup" && subject.local && subject.active && subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});

I basically see the following lines in my logs once I enter the passwords on startup:

Nov 10 15:40:55 vt.io polkitd[1248]: Operator of unix-session:2 successfully authenticated as unix-user:eyt to gain TEMPORARY authorization for action org.blueman.network.setup for system-bus-name::1.333 [/usr/bin/python3 /usr/bin/blueman-applet] (owned by unix-user:eyt)
Nov 10 15:40:57 vy.io polkitd[1248]: Operator of unix-session:2 successfully authenticated as unix-user:eyt to gain TEMPORARY authorization for action org.blueman.rfkill.setstate for system-bus-name::1.333 [/usr/bin/python3 /usr/bin/blueman-applet] (owned by unix-user:eyt)
Nov 10 15:41:26 vt.io audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=blueman-mechanism comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Any ideas how can I overcome the authentication checks at startup?

EDIT:

Apparently, I saw the following error:

Nov 10 16:03:35 vt.io polkitd[1117]: Error compiling script /etc/polkit-1/rules.d/81-blueman.rules

It is defined as shown above, and has the following permissions:

-rw-r--r--. 1 root root 411 Nov 10 15:39 81-blueman.rules

Any reason why the compilation may fail?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-11-10 09:22:42 -0600

hhlp gravatar image

Yes is anoyying I've had had the same and start to investigate it's about Polkitauth 2 0 change in blueman :

check is in the whell group First :

id username

If not, Add your user to wheel Group, probabili you did it and the moemnt of install fedora :

usermod username -a -G wheel

You could also use the system-config-users GUI, of course.

created a new file /etc/polkit-1/rules.d/90-blueman.rules use sudo to get write permision in \etc directory :

with the following :

/* Allow users in wheel group to use blueman feature requiring root without authentication */
polkit.addRule(function(action, subject) {
    if ((action.id == "org.blueman.network.setup" ||
         action.id == "org.blueman.dhcp.client" ||
         action.id == "org.blueman.rfkill.setstate" ||
         action.id == "org.blueman.pppd.pppconnect") &&
        subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});

and that's all

Regards.,

Taken from here

edit flag offensive delete link more

Comments

Thank you very much! This indeed solved the problem! Probably my rule above wasn't enough. But, I guess one needs to use /* */ for comments and not #.

ET gravatar imageET ( 2018-11-10 09:33:52 -0600 )edit

thanks...it's a help to me....have a nice day !!

simmon gravatar imagesimmon ( 2018-12-24 00:03:00 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-11-10 07:45:49 -0600

Seen: 121 times

Last updated: Nov 10 '18