How to auto mount cifs share in Linux without password - Ubuntu Jammy Jellyfish

preview_player
Показать описание
Learn how to auto mount Windows / Samba shares (CIFS) on Linux using PAM mount (libpam-mount) and Ubuntu 22.04.1 LTS. This method does NOT require creating a credentials text file!

You'll also learn how to:

In this video, I use a fresh install of Ubuntu Desktop 22.04.1 Jammy Jellyfish. The only modifications I did prior to recording the video were:
- Disabled the overview on startup
- Installed and enabled XRDP

This video will step through the following:
00:00 - Introduction
02:22 - Install required library files
02:46 - Review modified files
05:00 - Review and Update Global PAM Config file
11:12 - Configure user managed PAM Config
15:55 - Confirm mounted drives

============= REFERENCES/RESOURCES ===============
Pam mount:

=======================================

Disclaimers:
===========================================
Please note any non-English Subtitles are auto-translated.

This video was NOT sponsored by any vendor. Any paid products/services shown were paid for out of my own pocket.

The following are PAID affiliate links. Any revenue generated via the links below will help pay for systems and services used in the hosting and production of my content:
- - -

== My Gear - #AD Amazon Links:
As an Amazon Associate, I earn from qualifying purchases.

Рекомендации по теме
Комментарии
Автор

Nice clear walk-through tutorial! Thanks for using a clean install, it helps validate that the commands used will actually work - and they did for me! I have my Ubuntu Workstation automounting multiple shares from my Windows 2019 Server now after following the steps in this video :)

GeekInTheRough
Автор

i was exited to finally solve my problem with pam_mount but at the end it did not worked :( i Have one active directory on windows (joining from ubuntu worked like charm) this video ith the pam the main config worked during the test, but: the config on the remote server for my case wich is a samba server joined to my active directory it did not worked at all. i get a not found folder :( (mount.c:549): 1066 29 7:13 / /snap/snapd/19361 ro, nodev, relatime shared:568 - squashfs /dev/loop13 ro, errors=continue
(pam_mount.c:522): mount of luis failed
(rdconf2.c:126): checking sanity of luserconf volume record (homes/luis)
(mount.c:776): Could not get realpath of /home/luisshares/NAS-Home: No such file or directory
(mount.c:246): Mount info: luserconf, user=luis <volume fstype="cifs" path="homes/luis" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="nodev, nosuid" /> fstab=0 ssh=0
(mount.c:300): mkmountpoint: checking /home
(mount.c:300): mkmountpoint: checking /home/luisshares
(mount.c:300): mkmountpoint: checking /home/luisshares/NAS-Home
(mount.c:324): mkdir[1000] /home/luisshares/NAS-Home
(mount.c:655): Password will be sent to helper as-is.
command: 'mount' '-t' 'cifs' '/home/luisshares/NAS-Home' '-o' 'username=luis, uid=1000, gid=1000, nodev, nosuid'

ended after 5 hours trying to figure it out what was wrong. and i think for today i give up.

ethangender