PDA

View Full Version : Bug/oddity when shutting down Knoppix 6.2 (CD)



zsd
12-09-2009, 01:05 AM
It seems that lxsession-logout checks with /usr/share/PolicyKit/policy/org.freedesktop.hal.power-management.policy to make sure it is allowed to shutdown or reboot the computer.

I created a second account on a Knoppix 6.2 CD system, put it in the same groups as the knoppix account, gave it the same line as koppix in /etc/sudoers, and then changed USER="knoppix" and GROUP="knoppix" in /etc/init.d/knoppix-startx. Then I logged out of the knoppix account and was automagically logged back in to the new account. I did a recursive diff of the two home directories and didn't see any differences which seemed relevant.

However, unlike the knoppix account, the new account can't shut down the system via a call to lxsession-logout; all that happens is that the new account is logged out and then automatically logged back in again.

polkit-auth shows that the knoppix account has (among many other things) org.freedesktop.hal.power-management.reboot and org.freedesktop.hal.power-management.reboot-multiple-sessions, whereas my new account does not have the -multiple-sessions capability. Further, strace'ing lxsession-logout shows that the -multiple-sessions capability is the one desired.

Q1: given there is only one session, why does lxsession-logout look for org.freedesktop.hal.power-management.reboot-multiple-sessions

Q2: why does the knoppix user get this capability, but not my new account?

If anyone can shed some light on this, I'd appreciate it.

(I can work around this by modifying usr/share/PolicyKit/policy/org.freedesktop.hal.power-management.policy, but I prefer to not mess with things like that if I don't really need to.)

Thanks.

Jim

utu
07-14-2010, 04:30 PM
@Jim

I notice you've not received any response to your PolicyKit questions.
I have some similar but simpler PolicyKit concerns and wonder if you've
found any useful documentation that applies to Knoppix or Debian systems.

I find in both my Knoppix 6.2.1 and Ubuntu 10.04 systems, a number of
inexplicable .xsession-error entries that relate to PolicyKit errors.
I'd at least like to understand these. I'd even settle for an opt-out
alternative to not bother with this capability, whatever it is. But I
don't know how to do this in an intelligent way.

So, have you found any good information in this regard?

zsd
07-23-2010, 02:46 AM
None. Zip. Nada. Jack squat. Bugger all. :-)

Sorry I can't help you (or me) here. Except for creating a bootable system with some of my own software on it (for which I use knoppix), I normally use Slackware, which Just Works (TM). I usually have an Ubuntu system sitting around, and while Ubuntu usually also Just Works for me, I must admit that when it doesn't, I find that tracking down and fixing the problem usually involves some cursing and pulling hair out. Bah! :-(

krishna.murphy
07-23-2010, 04:14 AM
Wish I had some great insight to offer. Perhaps the solution to the creation of a list of errors you don't care about is to send them away; it's easy enough to make a symlink to /dev/null and then they'll just vanish, right?

Ciao!
Krishna :mrgreen:

mecho
07-23-2010, 08:04 AM
There is a line in /etc/init.d/knoppix-autoexec which creates /etc/hostname with one specified knoppix-autoexec. Try to change it with your new user name. I dont say this will work, but I've heard many weared problems with wrongly set hostname. So it's worth the try

mecho
07-23-2010, 08:59 AM
Discard my previous post - I think your problem lies in /etc/PolicyKit/PolicyKit.conf
<define_admin_auth user="root|knoppix"/>
<!-- user knoppix is always returned as authorized -->
<match user="knoppix">
<return result="yes"/>
Add your new user name there and restart hal, make sure your in power group too. You should then be able to shutdown and reboot

zsd
07-23-2010, 01:17 PM
Wish I had some great insight to offer. Perhaps the solution to the creation of a list of errors you don't care about is to send them away; it's easy enough to make a symlink to /dev/null and then they'll just vanish, right?

Ciao!
Krishna :mrgreen:

Who said they have a list of errors they don't care about? Were you replying to another post in another forum, or is there a comprehension problem going on here?

zsd
07-23-2010, 01:20 PM
Mecho,

thanks for your response. I'm not sure I like this way of doing things (modifying that file to allow another user to shut down the system), but I guess it is better than what I did (modifying /usr/share/PolicyKit/policy/org.freedesktop.hal.power-management.policy). In any case, I appreciate you pointing out that solution. I thought I had done a grep -r looking for 'knoppix' to find where that user might be getting special treatment, but apparently I missed that one.

Cheers.

krishna.murphy
07-23-2010, 04:19 PM
Who said they have a list of errors they don't care about? Were you replying to another post in another forum, or is there a comprehension problem going on here?

Just an idea in response to:

I find in both my Knoppix 6.2.1 and Ubuntu 10.04 systems, a number of
inexplicable .xsession-error entries that relate to PolicyKit errors.
I'd at least like to understand these. I'd even settle for an opt-out
alternative to not bother with this capability, whatever it is. But I
don't know how to do this in an intelligent way.

mecho
07-23-2010, 06:53 PM
You are welcome. I noticed the thread was old too late :) anyway it might be helpful to someone else in the same situation

zsd
07-24-2010, 01:17 AM
Just an idea in response to:

I still don't see how you are getting "you don't care about" out of utu's message, but since it is now apparent you were talking about what utu said, and not the post directly above your post, I'll leave the correct interpretation of utu's remarks to utu.