FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-05-2012, 01:30 AM
Jason Heeris
 
Default Live Squeeze system: ConsoleKit does not see serial console as active, cannot mount with udisk

I'm building a Debian Squeeze system with live-builder 3.0~a45 (from
Ubuntu 11.10). I'm running into a problem where I can't use udisk to
mount devices using a serial console on the live system (perhaps due
to problems with consolekit or policykit). Sorry for the cross-post -
I've already asked about this on the debian-live list, and they had no
idea, so I'm asking here.

I configure a serial console using the boot line and some boot-time
sedding to produce this line in /etc/inittab:

T0:23:respawn:/bin/login -f user </dev/ttyS0 >/dev/ttyS0 2>&1

My problem is this: when I try to use udisk to mount an image via a
serial console, I get:

----
user@my-live-usb:~$ udisks --mount /dev/disk/by-label/image-data
--mount-options ro
Mount failed: Not Authorized
----

I read through a heap of forum postings and bug reports, and
eventually figured to try:

----
user@my-live-usb:~$ pkexec true
Error executing command as another user: Not authorized

This incident has been reported.
----

Then I ran "ck-list-sessions" and saw that only Session 5, on
/dev/tty1, has "active = TRUE" - the console I'm actually using
(Session 1 on /dev/ttyS0) has "active = FALSE".

Am I right in thinking that this is why udisk is failing to mount the
device when run on a serial console? I checked that my udisks command
worked with a video console, and it does. But unfortunately, this is
not practical - I need to be able to run the command at a serial
console OR a video console.

It's worth pointing out that under this live system, the default user
("user") is automatically logged in on every video console and the
serial console.

If I look in "/usr/share/polkit-1/actions/org.freedesktop.udisks.policy",
there's a group of keys under "<action
id="org.freedesktop.udisks.filesystem-mount">":

<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>

Changing the "allow_inactive" and "allow_any" keys to yes makes no
difference. I figure that I somehow need to tell consolekit that the
serial port is an active console. But how?

I dug around the ConsoleKit docs and played around with the DBUS
methods for activating the current session, but it didn't work:

user@mwa-live-usb:~$ dbus-send --system --print-reply
--dest="org.freedesktop.ConsoleKit"
/org/freedesktop/ConsoleKit/Session7
org.freedesktop.ConsoleKit.Session.Activate
Error org.freedesktop.DBus.GLib.UnmappedError.CkSeatErro r.Code0:
Unable to activate session

So how do I get ConsoleKit to either recognise the serial console as
active, or let udisks mount the partition?

(udisks is 1.0.1+git20100614-3, consolekit is 0.4.1-4)

Thanks,
Jason


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CA+Zd3FcVOrVV1eN1gFYwK8K-Jqq=FJnY=4K-A+Amqy6eVREM6Q@mail.gmail.com">http://lists.debian.org/CA+Zd3FcVOrVV1eN1gFYwK8K-Jqq=FJnY=4K-A+Amqy6eVREM6Q@mail.gmail.com
 
Old 04-05-2012, 08:52 AM
Andrei POPESCU
 
Default Live Squeeze system: ConsoleKit does not see serial console as active, cannot mount with udisk

On Jo, 05 apr 12, 09:30:17, Jason Heeris wrote:
>
> So how do I get ConsoleKit to either recognise the serial console as
> active, or let udisks mount the partition?

Maybe libpam-ck-connector helps?

Kind regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 
Old 04-05-2012, 09:05 AM
keith
 
Default Live Squeeze system: ConsoleKit does not see serial console as active, cannot mount with udisk

Jason Heeris wrote:

My problem is this: when I try to use udisk to mount an image via a
serial console, I get:

----
user@my-live-usb:~$ udisks --mount /dev/disk/by-label/image-data
--mount-options ro
Mount failed: Not Authorized
----

I read through a heap of forum postings and bug reports, and
eventually figured to try:

----
user@my-live-usb:~$ pkexec true
Error executing command as another user: Not authorized

This incident has been reported.

Do you need to be root?


--
Sent from Free Open Source Software
Debian GNU/Linux


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4F7D6062.8090506@yahoo.co.uk">http://lists.debian.org/4F7D6062.8090506@yahoo.co.uk
 
Old 04-05-2012, 01:08 PM
Tom H
 
Default Live Squeeze system: ConsoleKit does not see serial console as active, cannot mount with udisk

On Wed, Apr 4, 2012 at 9:30 PM, Jason Heeris <jason.heeris@gmail.com> wrote:


> I'm building a Debian Squeeze system with live-builder 3.0~a45 (from
> Ubuntu 11.10). I'm running into a problem where I can't use udisk to
> mount devices using a serial console on the live system (perhaps due
> to problems with consolekit or policykit).
>
> I configure a serial console using the boot line and some boot-time
> sedding to produce this line in /etc/inittab:
>
> *T0:23:respawn:/bin/login -f user </dev/ttyS0 >/dev/ttyS0 2>&1
>
> My problem is this: when I try to use udisk to mount an image via a
> serial console, I get:
>
> ----
> user@my-live-usb:~$ udisks --mount /dev/disk/by-label/image-data
> --mount-options ro
> Mount failed: Not Authorized
> ----
>
> I read through a heap of forum postings and bug reports, and
> eventually figured to try:
>
> ----
> user@my-live-usb:~$ pkexec true
> Error executing command as another user: Not authorized
>
> This incident has been reported.
> ----
>
> Then I ran "ck-list-sessions" and saw that only Session 5, on
> /dev/tty1, has "active = TRUE" - the console I'm actually using
> (Session 1 on /dev/ttyS0) has "active = FALSE".
>
> Am I right in thinking that this is why udisk is failing to mount the
> device when run on a serial console? I checked that my udisks command
> worked with a video console, and it does. But unfortunately, this is
> not practical - I need to be able to run the command at a serial
> console OR a video console.
>
> It's worth pointing out that under this live system, the default user
> ("user") is automatically logged in on every video console and the
> serial console.
>
> If I look in "/usr/share/polkit-1/actions/org.freedesktop.udisks.policy",
> there's a group of keys under "<action
> id="org.freedesktop.udisks.filesystem-mount">":
>
> *<allow_any>no</allow_any>
> *<allow_inactive>no</allow_inactive>
> *<allow_active>yes</allow_active>
>
> Changing the "allow_inactive" and "allow_any" keys to yes makes no
> difference. I figure that I somehow need to tell consolekit that the
> serial port is an active console. But how?

I haven't used polkit since Fedora 12 was released with weird package
installation defaults and I don't have access to the notes that I made
at the time so what follows is just from looking at a Sid VM that I
have running.

Re "pkexec true": Is your user a member of the sudo group? sudo group
members can use pkexec via
"/etc/polkit-1/localauthority.conf.d/51-debian-sudo.conf". If you
don't want that user in the sudo group, you can create a conf file in
"/etc/polkit-1/localauthority.conf.d" to allow it to use pkexec.

Re "/usr/share/polkit-1/actions/org.freedesktop.udisks.policy": (It's
better to create a pkla file in
"/etc/polkit-1/localauthority/50-local.d" than edit a
"/usr/share/polkit-1/" file) Does pkaction display the changed values
for "org.freedesktop.udisks.filesystem-mount"?

No idea what to say or do about your "ck-list-sessions" output, sorry.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAOdo=SyWqb+rVWY-ks9N2t9n3t+=pwOZek1KNPO2UcTp9LTA@mail.gmail.com
 
Old 04-05-2012, 01:17 PM
Tom H
 
Default Live Squeeze system: ConsoleKit does not see serial console as active, cannot mount with udisk

On Thu, Apr 5, 2012 at 5:05 AM, keith <keithmck@yahoo.co.uk> wrote:
> Jason Heeris wrote:
>>
>> user@my-live-usb:~$ pkexec true
>> Error executing command as another user: Not authorized
>>
>> This incident has been reported.
>
> Do you need to be root?

pkexec is like sudo so you don't need to be root but you do need to be
authorized to use it.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOdo=SxdkCQuVDSE+AnAEv0g_mzoO5tvJkeh18w2KG_zOHnXB g@mail.gmail.com">http://lists.debian.org/CAOdo=SxdkCQuVDSE+AnAEv0g_mzoO5tvJkeh18w2KG_zOHnXB g@mail.gmail.com
 
Old 04-10-2012, 12:54 AM
Jason Heeris
 
Default Live Squeeze system: ConsoleKit does not see serial console as active, cannot mount with udisk

On 5 April 2012 16:52, Andrei POPESCU <andreimpopescu@gmail.com> wrote:
> Maybe libpam-ck-connector helps?

Alas no :/

— Jason


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CA+Zd3FcaDWYQBnVii38FVRhCED5A4KpcC
qCdmtLKPew+0zA@mail.gmail.com
 
Old 04-10-2012, 01:36 AM
Jason Heeris
 
Default Live Squeeze system: ConsoleKit does not see serial console as active, cannot mount with udisk

On 5 April 2012 21:08, Tom H <tomh0665@gmail.com> wrote:
> Re "pkexec true": Is your user a member of the sudo group? sudo group
> members can use pkexec via
> "/etc/polkit-1/localauthority.conf.d/51-debian-sudo.conf". If you
> don't want that user in the sudo group, you can create a conf file in
> "/etc/polkit-1/localauthority.conf.d" to allow it to use pkexec.

I've added the live user to the sudo group, but it didn't make a
difference (I confirmed that 51-debian-sudo.conf is there, too).

> Re "/usr/share/polkit-1/actions/org.freedesktop.udisks.policy": (It's
> better to create a pkla file in
> "/etc/polkit-1/localauthority/50-local.d" than edit a
> "/usr/share/polkit-1/" file) Does pkaction display the changed values
> for "org.freedesktop.udisks.filesystem-mount"?

I was not aware of the pkaction command, that's quite useful! Anyway,
pkaction does list org.freedesktop.udisks.filesystem-mount, but I
still get the "Not authorized" error when trying to mount the
filesystem via the serial line.

— Jason


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CA+Zd3FeSbkh6dDSsLCiASOTxc3J07kPrAf5pWTyX9U--aT-6uA@mail.gmail.com">http://lists.debian.org/CA+Zd3FeSbkh6dDSsLCiASOTxc3J07kPrAf5pWTyX9U--aT-6uA@mail.gmail.com
 
Old 04-13-2012, 01:01 PM
Tom H
 
Default Live Squeeze system: ConsoleKit does not see serial console as active, cannot mount with udisk

On Mon, Apr 9, 2012 at 9:36 PM, Jason Heeris <jason.heeris@gmail.com> wrote:
> On 5 April 2012 21:08, Tom H <tomh0665@gmail.com> wrote:
>>
>> Re "/usr/share/polkit-1/actions/org.freedesktop.udisks.policy": (It's
>> better to create a pkla file in
>> "/etc/polkit-1/localauthority/50-local.d" than edit a
>> "/usr/share/polkit-1/" file) Does pkaction display the changed values
>> for "org.freedesktop.udisks.filesystem-mount"?
>
> I was not aware of the pkaction command, that's quite useful! Anyway,
> pkaction does list org.freedesktop.udisks.filesystem-mount, but I
> still get the "Not authorized" error when trying to mount the
> filesystem via the serial line.

You have to use "pkaction --verbose --action-id
org.freedesktop.udisks.filesystem-mount" to check whether the settings
are active.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOdo=SxMCi0K7BhCD66UQVR=T4Kzfy-dTNyiOpc4efL0P-ts9A@mail.gmail.com">http://lists.debian.org/CAOdo=SxMCi0K7BhCD66UQVR=T4Kzfy-dTNyiOpc4efL0P-ts9A@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 08:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org