On Wed, Apr 4, 2012 at 9:30 PM, Jason Heeris <jason.hee...@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-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=SyWqb+rVWY-ks9N2t9n3t+=pwozek1knpo2uctp9...@mail.gmail.com