I installed an additional SSD on my pc. Everything works ok, except I need to unlock it with my root password on every session so that it mounts.

I’ve tried formatting it to change the ‘owner’, tried adding it to the user group, and I can’t find any other solutions. Any ideas?

This happens irrelevant of DE (happens on KDE and hyprland). I’m running tumbleweed, though this looks like a config problem rather than a distro problem.

  • caseyweederman
    link
    fedilink
    arrow-up
    3
    ·
    17 hours ago

    I have a related issue. Mine is a network share and it’s in fstab, but I have Linux boot without waiting for wifi, so the mount fails and then asks for root password when I try to mount it later.
    I think I just need to add “user” to the options field, right?

    • irotsoma@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      2
      ·
      7 hours ago

      Try adding the nofail and _netdev options in your fstab entry. I have this on a few computers that connect to nfs shares including my laptop that obviously can only connect when I’m at home or on VPN. Example:

      server:/path /mnt/path nfs4 defaults,nofail,_netdev 0 0

    • Brewchin@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      15 hours ago

      You may be right, but I worked around this using https://wiki.archlinux.org/title/NetworkManager#Network_services_with_NetworkManager_dispatcher

      I added the CIFS shares to my fstab with the _netdev option and created /etc/NetworkManager/dispatcher.d/30-nas-shares.sh containing (got the WiFi UUID using nmcli con show):

      #!/bin/sh
      WANTED_CON_UUID="UUID-OF-MY-WIFI"
      
      if [ "$CONNECTION_UUID" = "$WANTED_CON_UUID" ]; then
        case "$2" in
          "up"|"vpn-up")
            mount -a -t cifs
            ;;
        esac
      fi
      

      This waits for my WiFi to come up, ensures it’s my home WiFi, and then mounts my shares.

      There are probably other and better ways to do it, but it works.

    • Eskuero@lemmy.fromshado.ws
      link
      fedilink
      arrow-up
      3
      ·
      15 hours ago

      I believe systemd after targets work tho I have never tried them Try adding this to mount options

      x-systemd.after=network-online.target