Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417035 - sys-fs/udisks-1.97.0-r1 wants root password to mount my mp3 device
Summary: sys-fs/udisks-1.97.0-r1 wants root password to mount my mp3 device
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-22 08:51 UTC by Pacho Ramos
Modified: 2012-05-23 11:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
udisksd output (udisks.out,16.03 KB, text/plain)
2012-05-22 09:24 UTC, Pacho Ramos
Details
udisksctl_dump (udisksctl_dump,30.98 KB, text/plain)
2012-05-22 09:37 UTC, Pacho Ramos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2012-05-22 08:51:19 UTC
Behavior has changed when I connect my mp3 device on Gnome2 since move to udisks:2, in /var/log/messages I see following errors:

May 22 10:46:27 belkin4 udisksd[2799]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
May 22 10:46:27 belkin4 udisksd[2799]: Error opening /etc/crypttab file: Failed to open file '/etc/crypttab': No such file or directory (g-file-error-quark, 4)
May 22 10:46:41 belkin4 polkitd(authority=local): Operator of unix-session:/org/freedesktop/ConsoleKit/Session1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount for system-bus-name::1.24 [/usr/libexec/gvfs-udisks2-volume-monitor] (owned by unix-user:pacho)

Then, a root password is demanded but I didn't provide it as looked strange to me to now need root access to get it working.


# emerge --info udisks
Portage 2.1.10.62 (default/linux/amd64/10.0/desktop/gnome, gcc-4.4.6, glibc-2.14.1-r3, 3.3.5-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.3.5-gentoo-x86_64-Intel-R-_Core-TM-_i5-2410M_CPU_@_2.30GHz-with-gentoo-2.1
Timestamp of tree: Mon, 21 May 2012 20:30:01 +0000
ccache version 3.1.6 [enabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r1, 3.2.3
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.6-r1, 4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo bumblebee x11 x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --autounmask-write"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles multilib-strict news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms sign split-log strict test test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ http://ftp.heanet.ie/pub/gentoo/"
LANG="es_ES.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="es es_ES en_US"
MAKEOPTS="-j5"
PKGDIR="/usr/local/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/bumblebee /usr/portage/local/layman/x11 /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 applet bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdr cli colord consolekit cracklib crypt cups cvs cxx dbus djvu dri dts dvd dvdr dvi eds emboss enchant encode evo exif fam fat ffmpeg firefox flac fortran fuse gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 gtkstyle http iconv jpeg kpathsea latex lcms ldap libnotify libvisual lyx mad mms mmx mmxext mng modules mono monolithic-build mp3 mp4 mpeg mudflap multilib musicbrainz nautilus ncurses network-cron networkmanager nls nptl ntfs ntp numa nvidia ogg opengl openmp optimized-qmake pam pango pch pcre pdf png policykit ppds pppd pulseaudio qt3support readline reiserfs scanner sdl session smp sna socialweb spell sse sse2 sse3 ssl ssse3 startup-notification svg t1lib tcpd test theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vcd vdpau vorbis wifi wxwidgets x264 xcb xml xorg xulrunner xv xvid youtube zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="es es_ES en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev nvidia vesa intel i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sys-fs/udisks-1.97.0-r1 was built with the following:
USE="crypt gptfdisk introspection (multilib) test -debug -doc -systemd"


Reproducible: Always
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2012-05-22 08:56:47 UTC
Stop /usr/lib/udisks2/udisksd and run it without the --no-debug option to get more verbose output.

And exactly same for /usr/libexec/polkitd. Run without --no-debug.
Comment 2 Pacho Ramos gentoo-dev 2012-05-22 09:24:38 UTC
polkitd output:

# /usr/libexec/polkitd
Entering main event loop
Connected to the system bus
Registering null backend at priority -10
Using authority class PolkitBackendLocalAuthority
Acquired the name org.freedesktop.PolicyKit1
Comment 3 Pacho Ramos gentoo-dev 2012-05-22 09:24:59 UTC
Created attachment 312653 [details]
udisksd output
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-05-22 09:31:43 UTC
And output of `udiskctl dump` for the device when it's connected? In particular I'm curious if it's marked as "MediaRemovable: true". But rest of the output might proof to be useful as well.

And then open a upstream bug with all of this data:

http://bugs.freedesktop.org/
Comment 5 Pacho Ramos gentoo-dev 2012-05-22 09:37:43 UTC
Created attachment 312661 [details]
udisksctl_dump
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2012-05-22 09:46:04 UTC
/org/freedesktop/UDisks2/drives/SONY_WALKMAN_0E49A7C1175081:
  org.freedesktop.UDisks2.Drive:
    ConnectionBus:              usb
    Ejectable:                  true
    Media:                      
    MediaAvailable:             true
    MediaChangeDetected:        true
    MediaCompatibility:         
    MediaRemovable:             true

^ nod, no root password should be asked...
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2012-05-22 09:47:07 UTC
Let me confirm:

After stable upgrade to the =sys-auth/consolekit-0.4.5_p20120320, you have restarted consolekit and everything that's using it, right?
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-05-22 09:57:43 UTC
Pacho, look at org.freedesktop.udisks2.policy:

  <action id="org.freedesktop.udisks2.filesystem-mount">
    <description>Mount a filesystem</description>
    <message>Authentication is required to mount the filesystem</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

If you are getting "FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount", it probably means that polkit and consolekit are not recognizing you as the user of the active session.
Comment 9 Pacho Ramos gentoo-dev 2012-05-22 10:11:59 UTC
(In reply to comment #7)
> Let me confirm:
> 
> After stable upgrade to the =sys-auth/consolekit-0.4.5_p20120320, you have
> restarted consolekit and everything that's using it, right?

Yes, I started my laptop this morning and it was updated yesterday

(In reply to comment #8)
> Pacho, look at org.freedesktop.udisks2.policy:
> 
>   <action id="org.freedesktop.udisks2.filesystem-mount">
>     <description>Mount a filesystem</description>
>     <message>Authentication is required to mount the filesystem</message>
>     <defaults>
>       <allow_any>auth_admin</allow_any>
>       <allow_inactive>auth_admin</allow_inactive>
>       <allow_active>yes</allow_active>
>     </defaults>
>   </action>
> 
> If you are getting "FAILED to authenticate to gain authorization for action
> org.freedesktop.udisks2.filesystem-mount", it probably means that polkit and
> consolekit are not recognizing you as the user of the active session.

How could I check that? I am the only user logged in today :/
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2012-05-22 10:12:49 UTC
ck-list-sessions output?
Comment 11 Pacho Ramos gentoo-dev 2012-05-22 10:13:35 UTC
(In reply to comment #8)
[...]
> If you are getting "FAILED to authenticate to gain authorization for action
> org.freedesktop.udisks2.filesystem-mount", it probably means that polkit and
> consolekit are not recognizing you as the user of the active session.

But I have just seen I only get that message when I refuse to put my root password. Maybe this is caused by that /etc/crypttab missing file?
Comment 12 Pacho Ramos gentoo-dev 2012-05-22 10:13:56 UTC
(In reply to comment #10)
> ck-list-sessions output?

# ck-list-sessions 
Session1:
	unix-user = '1001'
	realname = 'Pacho Ramos'
	seat = 'Seat1'
	session-type = ''
	active = TRUE
	x11-display = ':0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2012-05-22T07:08:07.084663Z'
	login-session-id = '11'
Comment 13 Pacho Ramos gentoo-dev 2012-05-22 18:18:05 UTC
Well, upstream closed the problem blaming on polkit and downstream :(

My polkit:

[ebuild   R    ] sys-auth/polkit-0.104-r1  USE="gtk introspection nls pam -debug -doc -examples -kde (-systemd)" 1,384 kB
[ebuild   R    ] gnome-extra/polkit-gnome-0.105  304 kB
Comment 14 Samuli Suominen (RETIRED) gentoo-dev 2012-05-22 18:22:03 UTC
How are you starting X? I can see from your ck-list-sessions output that it's with some Display Manager, but do you have .xinitrc or .xsession of sometype in place?
If so, what is the content of them?
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2012-05-22 18:23:30 UTC
And try polkit-0.105 (and you can stick with it until it's stabilized soon) just for test.
Comment 16 Pacho Ramos gentoo-dev 2012-05-22 18:24:57 UTC
I have normal gdm-2.20.11-r1, I have it set to autologin (for months) in my account, and don't have any more. Will check with latest polkit then
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2012-05-22 18:30:06 UTC
(In reply to comment #16)
> I have normal gdm-2.20.11-r1, I have it set to autologin (for months) in my
> account, and don't have any more. Will check with latest polkit then

My point was to query if there is extra 'dbus-launch' or 'ck-launch-session' somewhere that would launch the session in wrong place. Those shouldn't be used with Display Manager. Then things like $DBUS_SESSION_BUS_ADDRESS would end up wrong and break the connection.

The command upstream posted on the bug is giving same output? `pkaction --action-id org.freedesktop.udisks2.filesystem-mount --verbose`?
Comment 18 Pacho Ramos gentoo-dev 2012-05-22 19:14:21 UTC
$ pkaction --action-id org.freedesktop.udisks2.filesystem-mount --verbose
org.freedesktop.udisks2.filesystem-mount:
  description:       Mount a filesystem
  message:           Authentication is required to mount the filesystem
  vendor:            The udisks Project
  vendor_url:        http://udisks.freedesktop.org/
  icon:              drive-removable-media
  implicit any:      auth_admin
  implicit inactive: auth_admin
  implicit active:   yes
Comment 19 Pacho Ramos gentoo-dev 2012-05-22 19:26:59 UTC
(In reply to comment #15)
> And try polkit-0.105 (and you can stick with it until it's stabilized soon)
> just for test.

It's the same :(
Comment 20 Pacho Ramos gentoo-dev 2012-05-23 10:42:20 UTC
But, if I go to System nautilus window and manually click on device, it's properly mounted and opened :O

Some kind of incompatibility with gnome-2?
Comment 21 Pacho Ramos gentoo-dev 2012-05-23 10:47:57 UTC
I have switched from "Ask what to do" option for multimedia devices in nautilus to "open folder" and now looks to work.
Comment 22 Pacho Ramos gentoo-dev 2012-05-23 10:58:41 UTC
And now magically works even moving back to "ask" option and with a new created user account :/

Closing then
Comment 23 Samuli Suominen (RETIRED) gentoo-dev 2012-05-23 11:39:36 UTC
Excellent. Maybe this bug will help others...