• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Mounting Windows Shares

owensdj

Golden Member
I need to auto-mount a file share from a Windows machine in Lubuntu 14.04. This is a workgroup, not a domain. I looked at this guide:

https://wiki.ubuntu.com/MountWindowsSharesPermanently

and was able to get it to work by just adding the line in fstab. I'd rather use libpam_mount so I won't have to put the user name and password in a text file and it'll work when any user logs in. I did what the guide said, but it's not working. Any ideas?
 
If you use the 'auto' command in fstab command it will mount on boot, and mount regardless of user. What is not working exactly?

Libpam might be more useful if users need to mount different shares.
 
Demo, thanks for the reply. I got it to mount putting a command in fstab and putting the username and password on the Windows share in a credentials file. That works, but I wish I could get it working with the Linux log on username and password like in the section on libpam_mount in that guide. That would allow it to work even when the username and password changes without having to edit the credentials file.

I'm not sure how using 'auto' in the fstab command would let it mount regardless of user. What I'm using in fstab now looks like:

//servername/sharename /media/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,sec=ntlm 0 0
 
Last edited:
Sorry for the late reply, been really busy.

This is what mine looks like, probably some unnecessary bits in there but it 'works'.

//windowsserver/share /usr/local/data/'folder' cifs credentials=/home/'user'/.smbcredentials,dir_mode=0777,rw,auto,uid=1000,gid=1000,user 0 0

This mounts the share on startup. Not sure if that's what you are looking for or not.
 
Demo24 thanks for the reply. I also have it working that way. I was hoping to find a way to make it work without having to put the username and password into the credentials file. That guide has a section on doing it like that using libpam_mount, but I couldn't get it to work.
 
Back
Top