6

Mounting a SMB share on login is actually pretty. You first need to login as an Active directory user. For the time being I can not get it to work on TTY only machines but at some point I will find a way. Once you have logged in verify you have a Kerberos kicket by running klist. You should see your user and a path to the ticket.

Next, find the fully qualified domain name of the server you are trying to mount. This will be the computername.domain. Once you have figured that out you need to find the name of the share you are mounting.

Next, test mount the share with gio mount "smb://fqdn/sharename" with fqdn being the name from above and the share name being the share name. If everything worked, it should popup on your desktop. You should not need to enter a password as it should use the Ticket generated when you logged in.

If that worked you can make mount for all users on login with a desktop file. run sudo nano /etc/xdg/autostart/mount.desktop and put this inside

[Desktop Entry]
Name=mount SMB share
Comment=mount SMB share myshare
Type=Application
Terminal=false
Exec=/usr/bin/gio mount "smb://fqdn/sharename"

This should now work when a user logs in.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 28 May 2024
6 points (100.0% liked)

Samba (software)

51 readers
1 users here now

About Samba

Samba is the standard Windows interoperability suite of programs for Linux and Unix.

Samba is Free Software licensed under the GNU General Public License, the Samba project is a member of the Software Freedom Conservancy.

Since 1992, Samba has provided secure, stable and fast file and print services for all clients using the SMB/CIFS protocol, such as all versions of DOS and Windows, OS/2, Linux and many others.

Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments. It can function both as a domain controller or as a regular domain member.

Please note this is unofficial

founded 4 months ago
MODERATORS