View previous topic :: View next topic |
Author |
Message |
rupeshforu3 n00b
Joined: 19 Aug 2024 Posts: 57
|
Posted: Tue Jan 28, 2025 1:53 pm Post subject: security sub system or pam is preventing mounting partitions |
|
|
Hi I am Rupesh from India and I brought a new system with AMD Ryzen zen3 5500GT APU and Asus prime b450 motherboard. I have installed gentoo linux four months ago and it is working fine except there are some issues related to mounting partitions through gui file manager.
Upto now I have updated my system upto 10 times and at present everything is working fine except I can't mount exFAT or other partition types through gui file manager.
I am able to mount through command line but I can't mount directly through gui file manager like nemo and thunar etc.,.
Yesterday before updating my system I am able to mount but after updating the problem appeared.
I am getting error as can't mount Authorization not permitted.
I think that all the required software to run the system is installed but while updating settings related to security are changed.
I think that the main problem is Personal Authentication Module or PAM is preventing mounting partitions directly through gui file manager like nemo and thunar.
I have created similar threads before but there's no proper response and so I have created new one.
Kindly try to suggest how to mount other partitions through gui file manager like nemo and thunar. _________________ Regards,
Rupesh. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9883 Location: almost Mile High in the USA
|
Posted: Wed Jan 29, 2025 6:55 am Post subject: |
|
|
emerge --info ?
Are you using either systemd or elogind, and using udisks and polkit? These are necessary for gui-based automount to work. PAM, the pluggable authentication module, I've rarely found to be the issue though it's possible if you mucked with the pam config that screws up polkit. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
rupeshforu3 n00b
Joined: 19 Aug 2024 Posts: 57
|
Posted: Wed Jan 29, 2025 10:08 am Post subject: |
|
|
yes I am using systemd but I cant say about udisks and polkit
I am providing USE variable written in make.conf below
Code: |
USE="X systemd udev extras classic upower contrib vaapi -kde -qt -qt5"
|
I am providing output of emegge --info below
Code: |
Rupesh /home/build # emerge --info
Portage 3.0.66.1 (python 3.12.8-final-0, !../../var/db/repos/gentoo/profiles/default/linux/amd64/23.0/desktop/systemd, gcc-14, glibc-2.40-r8, 6.12.11-x86_64 x86_64)
=================================================================
System uname: Linux-6.12.11-x86_64-x86_64-AMD_Ryzen_5_5500GT_with_Radeon_Graphics-with-glibc2.40
KiB Mem: 15657976 total, 13634204 free
KiB Swap: 3276796 total, 3276796 free
Timestamp of repository gentoo: Tue, 28 Jan 2025 03:30:00 +0000
Head commit of repository gentoo: e762956b0a523a0f882ace72b88aa465b8631d9d
sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
app-misc/pax-utils: 1.3.8::gentoo
app-shells/bash: 5.2_p37::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.30.6::gentoo
dev-build/libtool: 2.5.4::gentoo
dev-build/make: 4.4.1-r100::gentoo
dev-build/meson: 1.6.1::gentoo
dev-lang/perl: 5.40.0-r1::gentoo
dev-lang/python: 3.11.11_p1::gentoo, 3.12.8_p1::gentoo, 3.13.1_p1::gentoo
dev-lang/rust-bin: 1.81.0-r101::gentoo, 1.83.0::gentoo
llvm-core/clang: 18.1.8-r6::gentoo
llvm-core/lld: 18.1.8::gentoo
llvm-core/llvm: 18.1.8-r6::gentoo, 19.1.4::gentoo
sys-apps/baselayout: 2.17::gentoo
sys-apps/sandbox: 2.39::gentoo
sys-apps/systemd: 256.10::gentoo
sys-devel/binutils: 2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc: 14.2.1_p20241221::gentoo
sys-devel/gcc-config: 2.12.1::gentoo
sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.40-r8::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: True
sync-rsync-verify-jobs: 1
sync-rsync-verify-max-age: 3
sync-rsync-extra-opts:
sync-rsync-verify-metamanifest: yes
Binary Repositories:
gentoobinhost
priority: 1
sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=znver3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=znver3 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=znver3 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=znver3 -O2 -pipe"
GENTOO_MIRRORS="https://mirrors.nxtgen.com/gentoo-mirror/gentoo-source/ http://mirrors.nxtgen.com/gentoo-mirror/gentoo-source/ rsync://ftp.iij.ad.jp/pub/linux/gentoo/ http://ftp.iij.ad.jp/pub/linux/gentoo/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="--jobs 10 --load-average 9"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet classic contrib crypt cups dbus dri dts dvd dvdr encode exif extras flac gdbm gif gpm gtk gui iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls ogg opengl openmp pam pango pcre pdf png policykit ppds qml qt6 readline sdl seccomp sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vaapi vorbis vulkan wayland wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_13" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Rupesh /home/build #
|
_________________ Regards,
Rupesh. |
|
Back to top |
|
|
rupeshforu3 n00b
Joined: 19 Aug 2024 Posts: 57
|
Posted: Wed Jan 29, 2025 10:13 am Post subject: |
|
|
I have searched and found that my USE variable consists of udisks and policykit. _________________ Regards,
Rupesh. |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 467
|
Posted: Wed Jan 29, 2025 1:09 pm Post subject: |
|
|
It might be polkit rules.
I have a rule to allow me to mount within the file manager without authentication.
(If you want to configure the file manager to prompt for authentication every time, that is another issue.)
Code: | // Allow udisks2 to mount devices without authentication
// for users in the "wheel" group.
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
action.id == "org.freedesktop.udisks2.filesystem-mount") &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
|
This example uses members of the wheel group. But it could easily be the name of the group named after the user (the user login name.) You can edit it accordingly.
The file is named:
/etc/polkit-1/rules.d/10-udisks2.rules |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9883 Location: almost Mile High in the USA
|
Posted: Wed Jan 29, 2025 7:21 pm Post subject: |
|
|
The defaults provided by Gentoo/Freedesktop within the packages should work as-is, I did not need to change the default polkit/udev rules in any of my machines and did not have to be in the 'wheel' group to auto mount removable media at console (usb, cdrom, etc.), so something is going on.
The usual suspects are first not having dbus working, and then not getting a 'seat' (run 'loginctl to verify you have a seat') at the console but having systemd-logind should have solved that. Using 'startx' to start your gui without starting a dbus session in the past was also a very common reason for it not working, but this should be a distant memory by now...
With these working udisks handles the actual mount and polkit gives permissions to mount. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 467
|
Posted: Thu Jan 30, 2025 4:01 am Post subject: |
|
|
eccerr0r wrote: | The defaults provided by Gentoo/Freedesktop within the packages should work as-is, I did not need to change the default polkit/udev rules in any of my machines and did not have to be in the 'wheel' group to auto mount removable media at console (usb, cdrom, etc.), so something is going on.
With these working udisks handles the actual mount and polkit gives permissions to mount. |
As I said, the example rule uses the wheel group, but it could be any group and to edit accordingly. The defaults did not work as-is on either of my machines when using KDE Plasma and the Dolphin file manager. The rule was necessary on both machines or mounting without requiring elevated permisssions within KDE Plasma's file manager did not work. Hence the reason I mentioned the rule because without it, I cannot mount file systems in the file manager without permissions. |
|
Back to top |
|
|
rupeshforu3 n00b
Joined: 19 Aug 2024 Posts: 57
|
Posted: Thu Jan 30, 2025 9:43 am Post subject: |
|
|
Hi I am able to mount other partitions without permissions.
I think everything other will work fine _________________ Regards,
Rupesh. |
|
Back to top |
|
|
rupeshforu3 n00b
Joined: 19 Aug 2024 Posts: 57
|
Posted: Thu Jan 30, 2025 9:46 am Post subject: |
|
|
Another issue is when I press shutdown button from power menu the system is not getting down instead getting logged out. After that I have to press shutdown button again to halt.
How to halt directly through gui. _________________ Regards,
Rupesh. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2202
|
Posted: Thu Jan 30, 2025 10:11 am Post subject: |
|
|
rupeshforu3, as far as I can see, you don't say which desktop you are using. I had similar problems some time ago using LXDE on Arch Linux which was caused by not having GVFS installed. _________________ Greybeard |
|
Back to top |
|
|
rupeshforu3 n00b
Joined: 19 Aug 2024 Posts: 57
|
Posted: Thu Jan 30, 2025 12:48 pm Post subject: |
|
|
I am using desktop environments called
Cinnamon
Mate
Xfce
Lxde
Mounting problem exists on all of the above and now it is solved.
At present the main issue is I can't shutdown directly while working in the above desktop environments. I mean when I select shutdown button in power menu the system is getting logout instead of shutdown.
In the display manager again I have to select shutdown option. _________________ Regards,
Rupesh. |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 467
|
Posted: Thu Jan 30, 2025 2:16 pm Post subject: |
|
|
rupeshforu3,
I am glad that you solved one of your problems. It is good that you can ask for help and others will take their time to work with you. In return, it would be beneficial if you could explain how you solved your mounting problem that you originally asked for assistance with in this thread. This has possibility to help others in the future. |
|
Back to top |
|
|
rupeshforu3 n00b
Joined: 19 Aug 2024 Posts: 57
|
Posted: Thu Jan 30, 2025 3:49 pm Post subject: |
|
|
Originally I installed Gentoo Linux from the beginning before four months back and after that I have updated my system upto 10 to 12 times.
Non source code based distributions just downloads packages from repository and copy files to local directories and after that apply hooks or post configuration steps. Mostly I think that they do not delete existing files or directories.
Take for example polkit.
But Gentoo Linux is based on source code and before updating the system the source code is compiled and after that copied to local storage.
I think that each and every package comes with use case and often it changes.
Each and every time while updating I got a request like " The package needs use case and do you accept it".
I say yes and after that all the downloaded source code is compiled and updated.
I think that use cases of different packages are in conflict with each other.
Also I think one package update may delete or alter the contents of other package.
According to the above scenarios polkit files which were present previously are deleted and so I have created a new file related to polkit and finally worked.
Gentoo is great but I think portage must check whether package update is going to delete or alter files related to other packages. Each and every package must contain a specification that the package consists a list of files and directories which are going to copied after compilation phase.
Other distributions check at the initial stage itself whether the current one is going to delete or alter files related to others. If it is the installation or update process is aborted.
I have expressed my views and hope helpful to the remaining community. _________________ Regards,
Rupesh. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9883 Location: almost Mile High in the USA
|
Posted: Thu Jan 30, 2025 6:14 pm Post subject: |
|
|
rab0171610 wrote: | As I said, the example rule uses the wheel group, but it could be any group and to edit accordingly. The defaults did not work as-is on either of my machines when using KDE Plasma and the Dolphin file manager. The rule was necessary on both machines or mounting without requiring elevated permisssions within KDE Plasma's file manager did not work. Hence the reason I mentioned the rule because without it, I cannot mount file systems in the file manager without permissions. |
This sounds like something's wrong with your setup too. You should not need to change the defaults or put yourself in 'wheel' to automount on a default Gentoo install.
rupeshforu3 wrote: | Originally I installed Gentoo Linux from the beginning before four months back and after that I have updated my system upto 10 to 12 times.
Non source code based distributions just downloads packages from repository and copy files to local directories and after that apply hooks or post configuration steps. Mostly I think that they do not delete existing files or directories.
|
Looks like perhaps etc-update/dispatch-conf weren't run? For both of you?
Yes this is sort of a weak spot for Gentoo but it can't be avoided. If you change versions or providers sometimes config files radically change. The binaries may support the features you want (and this is sometimes gated to stuff like USE=-* or trying to build a system without specifying a profile that would have made it like other distributions) but disabled due to old config file. etc-update/dispatch-conf was added to help this instance but it can be really confusing if you changed it and then the new version changed it again. Otherwise it's best to just take the new version of the config file and recreate your customizations. Granted 4 months isn't that big a time leap, some of my machines have a 1 year cadence...
The other suggestion I had prior to fixing things was ensuring everything was up to date to emerge --update --changed-use @world ... but looks like it wasn't necessary. Still recommended that things are kept up to date. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 467
|
Posted: Thu Jan 30, 2025 6:45 pm Post subject: |
|
|
eccerr0r,
For the record I did not indicate you "have" to add yourself to the wheel group. Creating or modifying polkit rules is acceptable and can customize default behaviors.
If I wanted to automount removable media automatically when logging in or immediately when plugged in I would not need the rule. I can set that in System Settings. However, I do not and the final solution did not apply to my preferences so I keep the polkit rule so I do not have to deal with the password prompt when mounting filesystems. It has nothing to do with updating config files or dispatch-conf. Thanks anyway.
I suggest it as a troubleshooting mechanism to see if it alleviated the symptoms, especially since the OP refers to mounting filesystems within the file manager, not the console. If not requiring permissions the user is the enable to mount in the file manager, it is a permissions problem. If, even without need for permissions, user is unable to mount in the file manger then it is likely not a permissions problem.
Regardless, he has solved that problem and that shipped has sailed. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|