Centos7

掛載點更改時登錄失敗

  • June 30, 2020

我正在通過*/etc/fstab*在 Centos 7 機器上安裝 Windows 10 共享,如下所示:

//10.11.11.7/shared_folder   /path/to/mount_point  cifs  user,rw,suid,uid=0,gid=1111,username=win_user,password=win_user,file_mode=0755,dir_mode=0777,vers=3.0   0 0

當我使用屬於權限組 1111 的使用者登錄時,登錄過程被中斷,我被踢回登錄螢幕。如果我使用 1111 組之外的使用者登錄,則登錄成功(當然,安裝的文件夾無法訪問)。

如果我創建一個名為**“mount_point_new”**的新文件夾並相應地調整 fstab,一切正常,即:

//10.11.11.7/shared_folder   /path/to/mount_point_new  cifs  user,rw,suid,uid=0,gid=1111,username=win_user,password=win_user,file_mode=0755,dir_mode=0777,vers=3.0   0 0

“mount_point”“mount_point_new”都具有相同的預掛載權限。我真的很想使用原始名稱(“mount_point”)作為路徑在某些配置中使用。我不是專業管理員,而是單人家庭辦公室設置,所以我真的很想了解問題並解決它,而不是通過使用新的掛載點名稱來避免它。

以下是登錄失敗後*/var/log/messages*的片段:

Jun 29 17:20:17 spiff dbus[1239]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Jun 29 17:20:17 spiff systemd: Starting Fingerprint Authentication Daemon...
Jun 29 17:20:17 spiff dbus[1239]: [system] Successfully activated service 'net.reactivated.Fprint'
Jun 29 17:20:17 spiff systemd: Started Fingerprint Authentication Daemon.
Jun 29 17:20:36 spiff systemd-logind: New session 3 of user frank.
Jun 29 17:20:36 spiff systemd: Started Session 3 of user frank.
Jun 29 17:20:38 spiff gnome-session: gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Housekeeping.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Housekeeping.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session: gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Mouse.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session: gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Rfkill.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session: gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.ScreensaverProxy.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session: gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Sharing.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session: gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Smartcard.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session: gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Sound.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Mouse.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session: gnome-session-binary[2825]: WARNING: Lost name on bus: org.gnome.SessionManager
Jun 29 17:20:38 spiff gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Rfkill.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.ScreensaverProxy.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Sharing.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Smartcard.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session-binary[2825]: WARNING: Application 'org.gnome.SettingsDaemon.Sound.desktop' killed by signal 15
Jun 29 17:20:38 spiff gnome-session-binary[2825]: WARNING: Lost name on bus: org.gnome.SessionManager
Jun 29 17:20:38 spiff journal: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes.
Jun 29 17:20:38 spiff journal: Cannot open display: 
Jun 29 17:20:38 spiff gdm: Failed to remove greeter program access to the display. Trying to proceed.
Jun 29 17:20:39 spiff com.redhat.imsettings: [ 1593408039.137374]: IMSettings-Daemon[6377]: INFO: Starting imsettings-daemon...
Jun 29 17:20:39 spiff com.redhat.imsettings: [ 1593408039.139154]: IMSettings-Daemon[6377]: INFO:   [HOME=/mnt/home/frank/.config/imsettings]
Jun 29 17:20:39 spiff com.redhat.imsettings: [ 1593408039.140495]: IMSettings-Daemon[6377]: INFO:   [XINPUTRCDIR=/etc/X11/xinit/]
Jun 29 17:20:39 spiff com.redhat.imsettings: [ 1593408039.141764]: IMSettings-Daemon[6377]: INFO:   [XINPUTDIR=/etc/X11/xinit/xinput.d/]
Jun 29 17:20:39 spiff com.redhat.imsettings: [ 1593408039.143115]: IMSettings-Daemon[6377]: INFO:   [MODULEDIR=/usr/lib64/imsettings]
Jun 29 17:20:39 spiff com.redhat.imsettings: [ 1593408039.144508]: IMSettings-Daemon[6377]: INFO:   [MODULES=gsettings, qt]
Jun 29 17:20:45 spiff com.redhat.imsettings: [ 1593408045.764493]: IMSettings-Daemon[6377]: INFO: Release the ownership of com.redhat.imsettings
Jun 29 17:20:45 spiff com.redhat.imsettings: Exiting...
Jun 29 17:20:45 spiff com.redhat.imsettings: [ 1593408045.767041]: GLib-GIO[6377]: CRITICAL **: Error while sending AddMatch() message: The connection is closed
Jun 29 17:20:45 spiff com.redhat.imsettings: [ 1593408045.768427]: GLib-GIO[6377]: CRITICAL **: Error while sending AddMatch() message: The connection is closed
Jun 29 17:20:45 spiff com.redhat.imsettings: [ 1593408045.769742]: IMSettings-Daemon[6377]: INFO: Unloading imesttings module: qt
Jun 29 17:20:45 spiff com.redhat.imsettings: [ 1593408045.770996]: IMSettings-Daemon[6377]: INFO: Unloading imesttings module: gsettings
Jun 29 17:20:45 spiff com.redhat.imsettings: [ 1593408045.772340]: IMSettings-Daemon[6377]: INFO: imsettings-daemon is shut down.
Jun 29 17:20:47 spiff systemd-logind: New session c2 of user gdm.
Jun 29 17:20:47 spiff systemd: Started Session c2 of user gdm.
Jun 29 17:20:47 spiff org.a11y.Bus: Activating service name='org.a11y.atspi.Registry'
Jun 29 17:20:47 spiff org.a11y.Bus: Successfully activated service 'org.a11y.atspi.Registry'
Jun 29 17:20:47 spiff org.a11y.atspi.Registry: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Jun 29 17:20:47 spiff gnome-session: generating cookie with syscall
Jun 29 17:20:47 spiff gnome-session: generating cookie with syscall
Jun 29 17:20:47 spiff gnome-session: generating cookie with syscall
Jun 29 17:20:47 spiff gnome-session: generating cookie with syscall
Jun 29 17:20:47 spiff gnome-session: gnome-session-binary[6605]: WARNING: Could not parse desktop file orca-autostart.desktop or it references a not found TryExec binary
Jun 29 17:20:47 spiff gnome-session-binary[6605]: WARNING: Could not parse desktop file orca-autostart.desktop or it references a not found TryExec binary
Jun 29 17:20:47 spiff dbus[1239]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
Jun 29 17:20:48 spiff dbus[1239]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Jun 29 17:20:48 spiff dbus[1239]: [system] Activating via systemd: service name='org.freedesktop.locale1' unit='dbus-org.freedesktop.locale1.service'
Jun 29 17:20:48 spiff systemd: Starting Locale Service...
Jun 29 17:20:48 spiff dbus[1239]: [system] Successfully activated service 'org.freedesktop.locale1'
Jun 29 17:20:48 spiff systemd: Started Locale Service.
Jun 29 17:20:48 spiff setroubleshoot: Exception during AVC analysis: must be encoded string without NULL bytes, not str
Jun 29 17:20:48 spiff setroubleshoot: Exception during AVC analysis: must be encoded string without NULL bytes, not str
Jun 29 17:20:49 spiff dbus[1239]: [system] Activating via systemd: service name='org.freedesktop.GeoClue2' unit='geoclue.service'
Jun 29 17:20:49 spiff systemd: Starting Location Lookup Service...
Jun 29 17:20:49 spiff journal: Failed to connect to avahi service: Daemon not running
Jun 29 17:20:49 spiff dbus[1239]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
Jun 29 17:20:49 spiff systemd: Started Location Lookup Service.
Jun 29 17:20:49 spiff journal: No permission to trigger offline updates: Polkit.Error: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered
Jun 29 17:20:49 spiff spice-vdagent[6825]: Cannot access vdagent virtio channel /dev/virtio-ports/com.redhat.spice.0
Jun 29 17:20:49 spiff gnome-session-binary[6605]: WARNING: App 'spice-vdagent.desktop' exited with code 1
Jun 29 17:20:49 spiff gnome-session: gnome-session-binary[6605]: WARNING: App 'spice-vdagent.desktop' exited with code 1
Jun 29 17:20:49 spiff gnome-session-binary: Entering running state
Jun 29 17:20:49 spiff spice-streaming-agent[6827]: Failed to open the streaming device "/dev/virtio-ports/org.spice-space.stream.0": 2 - No such file or directory
Jun 29 17:20:49 spiff dbus[1239]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Jun 29 17:20:49 spiff systemd: Starting Hostname Service...
Jun 29 17:20:49 spiff dbus[1239]: [system] Successfully activated service 'org.freedesktop.hostname1'
Jun 29 17:20:49 spiff systemd: Started Hostname Service.
Jun 29 17:20:49 spiff dbus[1239]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Jun 29 17:20:49 spiff systemd: Starting Fingerprint Authentication Daemon...
Jun 29 17:20:49 spiff dbus[1239]: [system] Successfully activated service 'net.reactivated.Fprint'
Jun 29 17:20:49 spiff systemd: Started Fingerprint Authentication Daemon.
Jun 29 17:20:49 spiff journal: Some code accessed the property 'AuthList' on the module 'authList'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Jun 29 17:20:49 spiff dbus[1239]: [system] Activating via systemd: service name='org.freedesktop.realmd' unit='realmd.service'
Jun 29 17:20:49 spiff systemd: Starting Realm and Domain Configuration...
Jun 29 17:20:49 spiff dbus[1239]: [system] Successfully activated service 'org.freedesktop.realmd'
Jun 29 17:20:49 spiff systemd: Started Realm and Domain Configuration.
Jun 29 17:20:49 spiff journal: Error looking up permission: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for geolocation
Jun 29 17:20:49 spiff org.gnome.Shell.desktop: Window manager warning: "XF86RFKill" is not a valid accelerator
Jun 29 17:20:49 spiff journal: JS WARNING: [resource:///org/gnome/shell/ui/layout.js 29]: reference to undefined property "MetaWindowX11"
Jun 29 17:20:50 spiff journal: Screen lock is locked down, not locking
Jun 29 17:20:52 spiff journal: driver/gl/cogl-framebuffer-gl.c:1558: GL error (1282): Invalid operation
Jun 29 17:21:15 spiff systemd-logind: Removed session 3.

以下是成功登錄後來自*/var/log/messages*的片段:

Jun 29 17:22:09 spiff dbus[1239]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Jun 29 17:22:09 spiff systemd: Starting Fingerprint Authentication Daemon...
Jun 29 17:22:09 spiff dbus[1239]: [system] Successfully activated service 'net.reactivated.Fprint'
Jun 29 17:22:09 spiff systemd: Started Fingerprint Authentication Daemon.
Jun 29 17:22:11 spiff systemd-logind: New session 4 of user frank.
Jun 29 17:22:11 spiff systemd: Started Session 4 of user frank.
Jun 29 17:22:14 spiff gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.A11ySettings.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session: gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.A11ySettings.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session: gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Housekeeping.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session: gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Mouse.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session: gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.PrintNotifications.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session: gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Rfkill.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session: gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.ScreensaverProxy.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session: gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Sharing.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session: gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Smartcard.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Housekeeping.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session: gnome-session-binary[6605]: WARNING: Lost name on bus: org.gnome.SessionManager
Jun 29 17:22:14 spiff gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Mouse.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.PrintNotifications.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Rfkill.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.ScreensaverProxy.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Sharing.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session-binary[6605]: WARNING: Application 'org.gnome.SettingsDaemon.Smartcard.desktop' killed by signal 15
Jun 29 17:22:14 spiff gnome-session-binary[6605]: WARNING: Lost name on bus: org.gnome.SessionManager
Jun 29 17:22:14 spiff journal: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes.
Jun 29 17:22:14 spiff journal: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes.
Jun 29 17:22:14 spiff journal: Cannot open display: 
Jun 29 17:22:14 spiff gdm: Failed to remove greeter program access to the display. Trying to proceed.
Jun 29 17:22:14 spiff systemd-logind: Removed session c2.
Jun 29 17:22:14 spiff com.redhat.imsettings: [ 1593408134.779897]: IMSettings-Daemon[8077]: INFO: Starting imsettings-daemon...
Jun 29 17:22:14 spiff com.redhat.imsettings: [ 1593408134.781320]: IMSettings-Daemon[8077]: INFO:   [HOME=/mnt/home/frank/.config/imsettings]
Jun 29 17:22:14 spiff com.redhat.imsettings: [ 1593408134.782272]: IMSettings-Daemon[8077]: INFO:   [XINPUTRCDIR=/etc/X11/xinit/]
Jun 29 17:22:14 spiff com.redhat.imsettings: [ 1593408134.783187]: IMSettings-Daemon[8077]: INFO:   [XINPUTDIR=/etc/X11/xinit/xinput.d/]
Jun 29 17:22:14 spiff com.redhat.imsettings: [ 1593408134.784091]: IMSettings-Daemon[8077]: INFO:   [MODULEDIR=/usr/lib64/imsettings]
Jun 29 17:22:14 spiff com.redhat.imsettings: [ 1593408134.784952]: IMSettings-Daemon[8077]: INFO:   [MODULES=gsettings, qt]
Jun 29 17:22:17 spiff dbus[1239]: [system] Activating service name='org.kde.powerdevil.backlighthelper' (using servicehelper)
Jun 29 17:22:18 spiff org.kde.powerdevil.backlighthelper: no kernel backlight interface found
Jun 29 17:22:18 spiff dbus[1239]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper'
Jun 29 17:22:23 spiff NetworkManager[1478]: <info>  [1593408143.1494] agent-manager: req[0x55c9e6008650, :1.112/org.kde.networkmanagement/1001]: agent registered
Jun 29 17:22:27 spiff rtkit-daemon[1354]: Successfully made thread 8504 of process 8504 (/usr/bin/pulseaudio) owned by '1001' high priority at nice level -11.
Jun 29 17:22:28 spiff com.redhat.imsettings: [ 1593408148.095736]: IMSettings-Daemon[8077]: WARNING **: Child process exited with code 1
Jun 29 17:22:28 spiff com.redhat.imsettings: [ 1593408148.100009]: IMSettings-Qt backend[8077]: WARNING **: Unable to obtain the DefaultInputMethod: Key file does not have group ?Qt?
Jun 29 17:22:28 spiff spice-vdagent[8524]: Cannot access vdagent virtio channel /dev/virtio-ports/com.redhat.spice.0
Jun 29 17:22:28 spiff spice-streaming-agent[8523]: Failed to open the streaming device "/dev/virtio-ports/org.spice-space.stream.0": 2 - No such file or directory
Jun 29 17:22:28 spiff com.redhat.imsettings: [ 1593408148.263348]: IMSettings-Daemon[8077]: INFO: Attempting to switch IM to none [lang=en_NZ.UTF-8, update=false]
Jun 29 17:22:28 spiff com.redhat.imsettings: [ 1593408148.321061]: IMSettings-Daemon[8077]: WARNING **: Child process exited with code 1
Jun 29 17:22:28 spiff com.redhat.imsettings: [ 1593408148.322752]: IMSettings-Daemon[8077]: INFO:   no need to invoke any auxiliary process for none
Jun 29 17:22:28 spiff com.redhat.imsettings: [ 1593408148.324006]: IMSettings-Daemon[8077]: INFO:   no need to invoke any main process for none
Jun 29 17:22:28 spiff org.a11y.Bus: Activating service name='org.a11y.atspi.Registry'
Jun 29 17:22:28 spiff rtkit-daemon[1354]: Successfully made thread 8578 of process 8504 (/usr/bin/pulseaudio) owned by '1001' RT at priority 5.
Jun 29 17:22:28 spiff org.a11y.Bus: Successfully activated service 'org.a11y.atspi.Registry'
Jun 29 17:22:28 spiff org.a11y.atspi.Registry: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Jun 29 17:22:28 spiff rtkit-daemon[1354]: Successfully made thread 8591 of process 8504 (/usr/bin/pulseaudio) owned by '1001' RT at priority 5.
Jun 29 17:22:28 spiff com.redhat.imsettings: [ 1593408148.372124]: IMSettings-Qt backend[8077]: INFO: Setting up xim as Qt immodule
Jun 29 17:22:28 spiff com.redhat.imsettings: [ 1593408148.374189]: IMSettings-GSettings backend[8077]: INFO: Setting up gtk-im-context-simple:xim as gtk+ immodule

原來*/path/to/mount_point/some/subfolder*是我的 LD_LIBRARY_PATH 的一部分(有充分的理由),並且該位置的文件會干擾登錄過程。我已經從 LD_LIBRARY_PATH 中刪除了路徑,現在可以成功登錄。

引用自:https://serverfault.com/questions/1023285