SLES11 SP3 : mount USB device with a user password

Hello everybody,

Could you please help me? Is it possible to setup SLES11 SP3 with KDE to ask for a user password instead of root password when I try to mount USB device in GUI?

After the installation system asks for a root password so I changed /etc/sysconfig/security to POLKIT_DEFAULT_PRIVS="standard"After that system do not ask for any password so I’ve updated file /etc/polkit-default-privs.local and added following line:

org.freedesktop.hal.storage.mount-removable auth_self system ask again for a root password even when I am logged as a standard user.

I need a working solution for GUI. sudo works well for me but I would like to avoid to use cmd line to mount USD pen drives.

Later I found “trick” to tell kdesu to use sudo. So I’ve created ~/.kde4/share/config/kdesurc file with the following content:

[super-user-command] super-user-command=sudo

After that system asked me for my user password but unfortunately USB drive was not mounted. Here is the output from /var/log/messages file:

JUN 29 17:43:29 hostname su: FAILED SU (to root) username on /dev/pts/2 JUN 29 17:43:32 hostname sudo: pam_unix2(sudo:auth): conversation failed JUN 29 17:43:32 hostname sudo: username: pam_authenticate: Conversation error; TTY=pts/1; PWD=/home/username; USER=root; COMMAND=/usr/lib/kde4/libexec/kdesu_stub -

In /etc/sudoer I have :

#Defaults targetpw #ALL ALL=(ALL) ALL username ALL=(ALL) ALL

Later I will update it just to mount and unmount commands but for the testing I let “ALL”.

Please, do you have any advice? Thank a lot in advance

really, there is nobody here who can help with this topic?

Hi kirso,

regarding the sudo approach - the “targetpw” option is on by default (see “man sudoers”), hence sudo by default expects the password of the target user (“rrot”, if not specified separately), not of the invoking user. Have you verified from CLI that your sudo setup actually works as expected?

Regards,
Jens

[QUOTE=jmozdzen;28651]Hi kirso,

regarding the sudo approach - the “targetpw” option is on by default (see “man sudoers”), hence sudo by default expects the password of the target user (“rrot”, if not specified separately), not of the invoking user. Have you verified from CLI that your sudo setup actually works as expected?

Regards,
Jens[/QUOTE]

Hi Jens,

Thank you for your reply. Yes, sudoers was set correctly. I can mount USB pen drives in CLI where system ask for user password and not root’s password. But the requirement is to have a working solution in GUI (KDE).

Hi Kirso,

I can mount USB pen drives in CLI where system ask for user password and not root’s password. But the requirement is to have a working solution in GUI (KDE).

I’m not too much into KDE, hence I cannot tell much about why the sudo way works via command line, but not via KDE.

Maybe someone else user can help out here?

Regards,
Jens