1

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
1
  • I have to do CHMOD 777 for now. For some reason even though i login with my username that has R/W access to that folder on ubuntu it thinks I am a guest and treats me as the everyone permission. As I said before I do not like having it like this. I know it is not behaving correctly. I have not been able to find anything. Perhaps my samba logging is not enabled? My logs are 0 bytes. – Kademlia Mar 23 '17 at 12:16
1

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
0

I had the same problem as well. I had to remove

map to guest = Bad User

From the config-file, the reason is that windows try to login with your windows username/password to the serve. When this do not work the server maps you as a guest and then windows deny the connection because of security reasons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.