shutdown asks for password with only 1 user logged in

Bug #445953 reported by Chris Weiss on 2009-10-08
112
This bug affects 21 people
Affects Status Importance Assigned to Milestone
MythTV
Fix Released
Unknown
consolekit (Ubuntu)
Low
Unassigned
mythtv (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: gdm

from reading similar but not directly related bug reports, I don't know if this gdm or fast-user-switch, so since i'm not actually switching users I'm going with gdm.

system upgraded from jaunty to karmic
power prefs set to ask on power button press
login 1 user
press power button, click shutdown or wait for the timeout
I get a prompt saying other users are logged in and need a password to shutdown.
with this prompt active, I ctrl-alt-f1 and login and run "sudo who". this lists my account on tty1 and tt7, as it should, there are no other users logged in. this was not a problem on jaunty and as I understand it, I should not get this prompt.

ProblemType: Bug
Architecture: i386
Date: Wed Oct 7 21:06:40 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: gdm 2.28.0-0ubuntu14
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-12.40-generic
SourcePackage: gdm
Uname: Linux 2.6.31-12-generic i686
XsessionErrors:
 (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:2943): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:2919): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (nautilus:3038): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed

Related branches

Chris Weiss (cweiss) wrote :
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, could you run ck-list-sessions when getting the issue and copying the log there? It's likely another bug about some cron job registering a session

Changed in gdm (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Chris Weiss (cweiss) wrote :

interesting update... I had this problem every time I shutdown, 3 days in a row, after upgrading and since making the bug report it hasn't happened once.

assuming it is a cron job, it's likely to have completed by the time I run ck-list-sessions, don't you think? is there anyway to log it? or maybe the dialog could actually tell you who else is logged in? it's not like the info is secret, any user can run `who` or ck-list-sessions.

Sebastien Bacher (seb128) wrote :

could you add the ck-list-sessions log rather than doing speculations on whether or not it's the issue?

Chris Weiss (cweiss) wrote :

clipped everything from the first event on 10/6 to the last shutdown on 10/8. I'm guessing the tty1 entries were me looking on the console to see why it thought there was another session, and to run ck-list-sessions. the /dev/??? are odd...

Sebastien Bacher (seb128) wrote :

is there any reason you refuse to run the ck-list-sessions and just add the log there? I will not comment after that one and just close the bug if you are not interested to reply to get those information

Chris Weiss (cweiss) wrote :

just running the command while logged in only lists my current X11 session. As i said, I have not gotten the prompt on logout again so I have no manual run of ck-list-session to report. I thought you asked for the log file from the date of the report, so I gave it.

Sebastien Bacher (seb128) wrote :

could be that the issue has been fixed in an upgrade but in any case that's a consolekit one

affects: gdm (Ubuntu) → consolekit (Ubuntu)
Changed in consolekit (Ubuntu):
status: Incomplete → New

On Tue Oct 13 15:17:44 UTC 2009 Launchpad Bug Tracker wrote:
> system upgraded from jaunty to karmic
> power prefs set to ask on power button press
> login 1 user
> press power button, click shutdown or wait for the timeout
> I get a prompt saying other users are logged in and need a password to shutdown.
> with this prompt active, I ctrl-alt-f1 and login and run "sudo who". this
> lists my account on tty1 and tt7, as it should, there are no other users logged
> in. this was not a problem on jaunty and as I understand it, I should not get
> this prompt.

Could you provide the output of ck-list-sessions when you see this issue please?

Thanks,

James

Adam Reviczky (reviczky) wrote :

It was mythtv for me.
Workaround was to uninstall it.

Same problem on ubuntuforums: http://ubuntuforums.org/showthread.php?p=8127631

Changed in consolekit (Ubuntu):
status: New → Confirmed
James Westby (james-w) wrote :

http://bazaar.launchpad.net/~ubuntu-mythtv/mythtv/mythtv-trunk-022/annotate/head%3A/debian/mythtv-backend.upstart

uses /bin/su to run as a different user, this opens a PAM session, which is not
wanted for a system daemon.

Thanks,

James

affects: consolekit (Ubuntu) → mythtv (Ubuntu)
Chris Weiss (cweiss) wrote :

before you guys get all crazy changing packages on this report, I'm fairly certain I don't have mythTV installed.

In my case, I suspect a SMB session from the wife's laptop, but since this a desktop role system I don't see why I have to put in a password for this. prompt on x11-display != '' I can see, but otherwise why care.

James Westby (james-w) wrote :

Chris, there will be multiple causes of this bug, if you don't have mythtv installed
then you have a different bug with the same symptom, so please file a new bug
report.

Thanks,

James

There's nothing incorrect about having a PAM session, many things run as different users have PAM sessions (e.g. cron scripts!)

They're non-interactive sessions, so should not be registered as a "logged in user" - the bug here is with CK for treating all active sessions as *inter*active sessions

affects: mythtv (Ubuntu) → consolekit (Ubuntu)
Chris Weiss (cweiss) wrote :

James, this *is* my bug report. however, the email generated from your post has"** Package changed: consolekit (Ubuntu) => mythtv (Ubuntu)" at the end making me think the package was being changed, but that doens't seem to be reflected on the web site so i guess it's not a problem

Chris Weiss (cweiss) wrote :

i can rule out smb, i connected, ran ck-list-sessions and it showed the X and smb sessions, hit shutdown and got no prompt.

Jan-Philipp Litza (jplitza) wrote :

At least for me, the problem was solved by changing the following line in /etc/init/mythtv-backend.conf
  exec /bin/su -c "/usr/bin/mythbackend $ARGS" $USER
to the following
  exec /usr/bin/sudo -u $USER /usr/bin/mythbackend $ARGS
I don't care if that's "the way it's supposed to be done"™, but it works. With the first line, ck-list-sessions lists a session for mythtv...

AJ1000 (drajaytandon) wrote :

I solved this by doing as specified in this thread (I did not uninstall mythtv):

http://ubuntuforums.org/showthread.php?t=1299948

Can this policykit change be put in the default mythbuntu build?

Steve Langasek (vorlon) wrote :

> There's nothing incorrect about having a PAM session, many things run as different users have PAM sessions (e.g. cron scripts!)

> They're non-interactive sessions, so should not be registered as a "logged in user" - the bug here is with CK for treating
> all active sessions as *inter*active sessions

cron scripts, however, no longer produce this error, because they now reference /etc/pam.d/common-session-noninteractive which doesn't call pam_ck_connector. The reason mythtv is still having this problem is that it calls su, and su must (and does) also support interactive sessions, so it *does* invoke pam_ck_connector unconditionally (su has no distinction between interactive vs. noninteractive uses).

Does mythtv *rely* on consolekit sessions in any way? (Or on any other aspects of PAM session handling?) If not, I think the easier fix here is to have mythtv not call su to change UIDs - this is run from an init script, it's a system service, it could just as well use start-stop-daemon for this and bypass PAM entirely.

After upgrading from Jaunty to Karmic, I had this problem too. After eventually tracking down this bug report (took me a while to work out that mythtv was to blame!), I followed the instructions from comment #17, and that fixed the problem for me.

Thank You Clyde i did not get a chance to try it out it crash on me again i could not get into it so i got another cd of ubuntu for i had lots of trouble of it crashing before i am hoping for the best with this one ty

> Date: Tue, 24 Nov 2009 12:25:10 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 445953] Re: shutdown asks for password with only 1 user logged in
>
> After upgrading from Jaunty to Karmic, I had this problem too. After
> eventually tracking down this bug report (took me a while to work out
> that mythtv was to blame!), I followed the instructions from comment
> #17, and that fixed the problem for me.
>
> --
> shutdown asks for password with only 1 user logged in
> https://bugs.launchpad.net/bugs/445953
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “consolekit” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: gdm
>
> from reading similar but not directly related bug reports, I don't know if this gdm or fast-user-switch, so since i'm not actually switching users I'm going with gdm.
>
> system upgraded from jaunty to karmic
> power prefs set to ask on power button press
> login 1 user
> press power button, click shutdown or wait for the timeout
> I get a prompt saying other users are logged in and need a password to shutdown.
> with this prompt active, I ctrl-alt-f1 and login and run "sudo who". this lists my account on tty1 and tt7, as it should, there are no other users logged in. this was not a problem on jaunty and as I understand it, I should not get this prompt.
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Oct 7 21:06:40 2009
> DistroRelease: Ubuntu 9.10
> NonfreeKernelModules: nvidia
> Package: gdm 2.28.0-0ubuntu14
> ProcEnviron:
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-12.40-generic
> SourcePackage: gdm
> Uname: Linux 2.6.31-12-generic i686
> XsessionErrors:
> (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
> (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
> (polkit-gnome-authentication-agent-1:2943): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
> (nautilus:2919): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
> (nautilus:3038): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed

_________________________________________________________________
Windows Live: Keep your friends up to date with what you do online.
http://go.microsoft.com/?linkid=9691815

Chris Weiss (cweiss) wrote :

just a status update:
I've gotten this once more, and it was a cron job but I don't know which one, by the time I dug that far into it, it was done.
I've since reinstalled clean to a new HDD, hopefully it won't come back.

clyde (clydetm) wrote :

Thank You it crash on me again i could not get back in it so i got a new ubuntu on new cd and a different hd too i had lots of trouble with that one i hope it is all better now clyde

> Date: Wed, 25 Nov 2009 16:18:40 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 445953] Re: shutdown asks for password with only 1 user logged in
>
> just a status update:
> I've gotten this once more, and it was a cron job but I don't know which one, by the time I dug that far into it, it was done.
> I've since reinstalled clean to a new HDD, hopefully it won't come back.
>
> --
> shutdown asks for password with only 1 user logged in
> https://bugs.launchpad.net/bugs/445953
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “consolekit” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: gdm
>
> from reading similar but not directly related bug reports, I don't know if this gdm or fast-user-switch, so since i'm not actually switching users I'm going with gdm.
>
> system upgraded from jaunty to karmic
> power prefs set to ask on power button press
> login 1 user
> press power button, click shutdown or wait for the timeout
> I get a prompt saying other users are logged in and need a password to shutdown.
> with this prompt active, I ctrl-alt-f1 and login and run "sudo who". this lists my account on tty1 and tt7, as it should, there are no other users logged in. this was not a problem on jaunty and as I understand it, I should not get this prompt.
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Oct 7 21:06:40 2009
> DistroRelease: Ubuntu 9.10
> NonfreeKernelModules: nvidia
> Package: gdm 2.28.0-0ubuntu14
> ProcEnviron:
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-12.40-generic
> SourcePackage: gdm
> Uname: Linux 2.6.31-12-generic i686
> XsessionErrors:
> (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
> (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
> (polkit-gnome-authentication-agent-1:2943): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
> (nautilus:2919): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
> (nautilus:3038): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed

_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
http://go.microsoft.com/?linkid=9691817

Karel Marik (kaja-marik) wrote :

Same issue here with mythtv on Karmic 386. Workaround #17 works perfectly for me.

Changed in mythtv (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in consolekit (Ubuntu):
status: Confirmed → Triaged
Mario Limonciello (superm1) wrote :

I've submitted 2 patches upstream for this behavior to allow mythbackend to drop permissions. Once that patch is accepted, we'll be able to modify our behavior to no longer user su.

Changed in consolekit (Ubuntu):
status: Triaged → Won't Fix
Changed in mythtv:
status: Unknown → New

Hi all,

as I am still experiencing this (annoying but not critical) bug, is there any update about the patch being accepted upstream, and thus the bug being fixed in Ubuntu? Thank you.

Regards,
Alfredo

Alfredo:

We're still waiting on upstream's approval for the patch. It's just sitting
on that bug with no one having reviewed it yet.

On Tue, Jan 26, 2010 at 03:23, Alfredo Pironti <email address hidden> wrote:

> Hi all,
>
> as I am still experiencing this (annoying but not critical) bug, is
> there any update about the patch being accepted upstream, and thus the
> bug being fixed in Ubuntu? Thank you.
>
> Regards,
> Alfredo
>
> --
> shutdown asks for password with only 1 user logged in
> https://bugs.launchpad.net/bugs/445953
> You received this bug notification because you are a member of Mythbuntu
> Bug Team, which is a direct subscriber.
>
> Status in MythTV: New
> Status in “consolekit” package in Ubuntu: Won't Fix
> Status in “mythtv” package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: gdm
>
> from reading similar but not directly related bug reports, I don't know if
> this gdm or fast-user-switch, so since i'm not actually switching users I'm
> going with gdm.
>
> system upgraded from jaunty to karmic
> power prefs set to ask on power button press
> login 1 user
> press power button, click shutdown or wait for the timeout
> I get a prompt saying other users are logged in and need a password to
> shutdown.
> with this prompt active, I ctrl-alt-f1 and login and run "sudo who". this
> lists my account on tty1 and tt7, as it should, there are no other users
> logged in. this was not a problem on jaunty and as I understand it, I
> should not get this prompt.
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Oct 7 21:06:40 2009
> DistroRelease: Ubuntu 9.10
> NonfreeKernelModules: nvidia
> Package: gdm 2.28.0-0ubuntu14
> ProcEnviron:
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-12.40-generic
> SourcePackage: gdm
> Uname: Linux 2.6.31-12-generic i686
> XsessionErrors:
> (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error:
> assertion `src != NULL' failed
> (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error:
> assertion `src != NULL' failed
> (polkit-gnome-authentication-agent-1:2943): GLib-CRITICAL **:
> g_once_init_leave: assertion `initialization_value != 0' failed
> (nautilus:2919): Eel-CRITICAL **: eel_preferences_get_boolean: assertion
> `preferences_is_initialized ()' failed
> (nautilus:3038): Eel-CRITICAL **: eel_preferences_get_boolean: assertion
> `preferences_is_initialized ()' failed
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~mythbuntu-bugs
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~mythbuntu-bugs
> More help : https://help.launchpad.net/ListHelp
>

--
Mario Limonciello
<email address hidden>
Sent from Austin, TX, United States

Mario Limonciello (superm1) wrote :

This has been fixed upstream now (by adding support for --user). Any future 0.23 based on r23521 or later will contain this fix. You can grab a 0.23 based build from http://mythbuntu.org/auto-builds for Karmic or Lucid. This bug will be automatically closed when a 0.23 based build is uploaded to the current development Ubuntu release (Lucid Lynx).

Keep in mind that 0.23 is not backwards compatible with and 0.22 based machine, so if you upgrade one machine, you'll have to upgrade them all.

Changed in mythtv (Ubuntu):
status: Triaged → Fix Committed

Thank You Very Much Clyde

> Date: Wed, 10 Feb 2010 17:29:12 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 445953] Re: shutdown asks for password with only 1 user logged in
>
> This has been fixed upstream now (by adding support for --user). Any
> future 0.23 based on r23521 or later will contain this fix. You can
> grab a 0.23 based build from http://mythbuntu.org/auto-builds for Karmic
> or Lucid. This bug will be automatically closed when a 0.23 based build
> is uploaded to the current development Ubuntu release (Lucid Lynx).
>
> Keep in mind that 0.23 is not backwards compatible with and 0.22 based
> machine, so if you upgrade one machine, you'll have to upgrade them all.
>
> ** Changed in: mythtv (Ubuntu)
> Status: Triaged => Fix Committed
>
> --
> shutdown asks for password with only 1 user logged in
> https://bugs.launchpad.net/bugs/445953
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in MythTV: New
> Status in “consolekit” package in Ubuntu: Won't Fix
> Status in “mythtv” package in Ubuntu: Fix Committed
>
> Bug description:
> Binary package hint: gdm
>
> from reading similar but not directly related bug reports, I don't know if this gdm or fast-user-switch, so since i'm not actually switching users I'm going with gdm.
>
> system upgraded from jaunty to karmic
> power prefs set to ask on power button press
> login 1 user
> press power button, click shutdown or wait for the timeout
> I get a prompt saying other users are logged in and need a password to shutdown.
> with this prompt active, I ctrl-alt-f1 and login and run "sudo who". this lists my account on tty1 and tt7, as it should, there are no other users logged in. this was not a problem on jaunty and as I understand it, I should not get this prompt.
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Oct 7 21:06:40 2009
> DistroRelease: Ubuntu 9.10
> NonfreeKernelModules: nvidia
> Package: gdm 2.28.0-0ubuntu14
> ProcEnviron:
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-12.40-generic
> SourcePackage: gdm
> Uname: Linux 2.6.31-12-generic i686
> XsessionErrors:
> (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
> (gnome-settings-daemon:2889): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
> (polkit-gnome-authentication-agent-1:2943): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
> (nautilus:2919): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
> (nautilus:3038): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/mythtv/+bug/445953/+subscribe

_________________________________________________________________
Introducing Windows® phone.
http://go.microsoft.com/?linkid=9708122

Changed in mythtv:
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 0.23.0~trunk23567-0ubuntu1

---------------
mythtv (0.23.0~trunk23567-0ubuntu1) lucid; urgency=low

  * Bump builds to start with 0.23
  * debian/control:
    - Fix vcs-bzr
    - Update depends to include ttf-droid, ttf-liberation, and ttf-dejavu.
      (LP: #224114)
    - Drop quilt build-dep, it appears to be included w/ dh7
    - Bump standards version
  * Introduces stable pulseaudio support (In Theory! :)) (LP: #311328)
  * Print message to stdout for MythTV.pm (LP: #327406)
  * debian/patches:
    - Drop 16_hal_shutdown. No longer necessary after r23518.
  * Allow shutdowns when mythtv is running (LP: #174712)
    - Comes from upstream changeset r23455.
  * Mythbackend now supports the --user flag to drop permissions from
    upstream changeset r23521.
  * Use the upstart script from the upstream contrib directory instead.
    Now uses the --user flag to drop permissions. (LP: #445953)
  * Update 30_python26_transition for changes upstream.
  * mythtv-database.templates:
    - refer to the proper location for backups.
  * Switch to use the upstream backup scripts. (LP: #469792)
  * Helps with HDTV stuttering. (LP: #451394)
  * Drop old debian/myth-*.sh scripts since we now use dbus for shutdown
    and reboot etc.
  * Drop old debian/mythtv-backend.default. It's just available for upgrades.
  * Drop old debian/mythtv-backend.init initscript. We're only supporting
    upstart going forward with these builds.
  * Drop unnecessary patch, 02_settings_pro.dpatch
  * Drop unused patch, 23_video_device_symlinks.dpatch
  * Drop unused patch, 25_skiploop_option.dpatch
  * Convert packaging to dh7.
  * Convert packaging to source v3 (w/ quilt).
  * Add debian/README.source as a symlink to the quilt README.source
  * Convert all .files into .install.
  * Refresh patches as quilt format instead
  * Rewrite get-orig-source rules to parse the changelog for version info.
  * Drop any of the Top Secret Options build flags
  * Include a custom snippet for debian/rules mythtv packages in libmyth-dev.
  * Drop old, unused templates from debian/templates.
 -- Mario Limonciello <email address hidden> Tue, 16 Feb 2010 21:23:04 -0600

Changed in mythtv (Ubuntu):
status: Fix Committed → Fix Released
Changed in mythtv:
status: Fix Released → Confirmed
Changed in mythtv:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.