Ubuntu – Samba share does not ask for credentials from Windows Client

file-sharingpermissionssambaserversmb

I have Windows Server 2012 with AD and other roles on it. I have an Ubuntu VM running in HyperV. Everything else works great. Apache and etc. I setup Samba and the shares. Shares show up fine. On Windows client I open them and I am not prompted for credentials even though I have disabled guest access. I have tried mapping it to a network drive with the user another user option selected and still no go. I have read access to the shares. It will let me write after I CHMOD 777 my share folder but I do not want that. Also I have checked and removed any saved credentials in Windows credentials manager related to the Ubuntu server.

I have created a samba user of "eg" as you see in the config below. This is also the name of the unix user I use to admin the Ubuntu server. I have checked the /var/log/samba folder but all logs for today are 0 bytes.

Below are my share configs:

 [EG Home]
   comment = EG User Home Share
   path = /home/eg
   valid users = eg
   browsable = yes
   guest ok = no
   read only = no
   create mask = 0775
   writeable = Yes
   write list = eg

[EG Web]
   comment = Web Files
   path = /www/
   valid users = eg
   browsable = yes
   guest ok = no
   read only = no
   create mask = 0775
   writeable = Yes
   write list = eg

Best Answer

I did some digging around on the Internet and I found that this worked for me. Just add this line anywhere in your smb.conf. I put it right before my shares. I figured it doesn't matter, then I rebooted the whole server, most likely only have to do Samba but I like to be sure settings take into effect:

[global]
admin users = root, smbadmin, [continue to list your Samba users you want to add to admins]
security = user
Related Question