Using Smb4K on openSUSE 12.3 without password prompt

Smb4K is my favorite tool for browsing and mounting SMB shares. Up until openSUSE 12.2 it mounted shares without prompting for the root password, through sudo rules. With openSUSE 12.2, this did not work out of the box anymore. The following post by Alexander Reinholdt helped me with the local policy override settings needed:

Root's password required every (u-) mount

Yesterday, I upgraded to OpenSuSE 12.3 and Smb4K started prompting again. I filed a bug report and was informed that local policy override is no longer supported in 12.3, which seems a bit strange to me since the GUI is still there in Configure Desktop / Actions Policy. Marcus Meissner, who replied to the bug report, sent me in the right direction though and told me to edit the file /etc/polkit-default-privs.local. Some Googling led me to this arcticle by Lukas Lipavsky, showing how to do it.

So, now my /etc/polkit-default-privs.local file contains these two lines:

de.berlios.smb4k.mounthelper.mount auth_admin:auth_admin:yes
de.berlios.smb4k.mounthelper.unmount auth_admin:auth_admin:yes

After editing the above file, as root, you must run this command to apply the privileges:

/sbin/set_polkit_default_privs

One minor fix was still needed to have Smb4K start automatically when I log on to KDE. When I simply added Smb4K to my Autostart list in System Setting, for some reason I got some error messages even though all my bookmarks were mounted correctly. I guess that there may be some timing problem so I created a small script, smb4k-delayed, containing:

#!/bin/sh
sleep 3
smb4k

The script starts smb4k with a three seconds delay. I added this to my autostart list instead and I don't see the error messages anymore.

Again, Smb4K works like a charm!

 

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.