0

I have asked this before, and everytime I think I found a solution it still will not work reliably, so here I go again. :(

I have several Windows 7 machines in my network and a linux server which hosts SMB. From all computers I can reliably connect to it, except one laptop. This laptop is from my company and therefore is differently configured. However, I had Windows XP before on that and there it always worked. Now we switched to W7 and suddenly it only works sometime.

At first I thought that it will work after rebooting, but apparently this is not the case. Sometimes it works, but most of the time I get an access denied when I try to logon.

I don't know how to resolve this issue, as I don't really have an idea where to look for. I tried entering \\Homedomain\username + password as well as simply username + password.

Is there maybe a problem with the encryption of the password? When I try to connect from that laptop via ssh on my cygwin console then there is no problem and I can also see the shares in the Windows Explorer. I just can't connect because I always get a permission denied.

Below is my smb.conf if that helps. I also included commented settings hwere I thought they may be of relevance just to show that those are on the default.

[global]
   workgroup = Homedomain
#   wins support = yes
;   wins server = w.x.y.z
   dns proxy = no
follow symlinks = yes
wide links = yes
unix extensions = no
;   name resolve order = lmhosts host wins bcast
;   interfaces = 127.0.0.0/8 eth0
;   bind interfaces only = yes
   log file = /var/log/samba/log.%m
   max log size = 1000
#   syslog only = no
   syslog = 0

####### Authentication #######
#   security = user

   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user

########## Domains ###########

;   domain logons = yes

############ Misc ############
#   domain master = auto
;   winbind enum groups = yes
;   winbind enum users = yes
   usershare allow guests = yes

[homes]
   comment = Home Directories
   browseable = yes

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no


[Downloading]
comment = Downloaddirectory
browseable = yes
writable = yes
create mask = 0660
directory mask = 0770
path = /downloading
7
  • You should respect the 'read only' and 'guest ok' params, and you can (probably safely) drop those masks. That path name looks weird and non POSIX.
    – 174140
    Jan 9, 2014 at 14:23
  • Try \\HOST_IP\SHARE_NAME. It must work somehow.
    – 174140
    Jan 9, 2014 at 14:24
  • @uprego, what do you mean by "respect" these params? I enter the path manually anyway, because I use TotalCmd. I also tried broswing there via Windows Explorer but this is the same. Is there some "net" command that I can inspect or change the shares manually?
    – Devolus
    Jan 9, 2014 at 16:38
  • By "respect" I meant that write them 'yes' or 'no' explicitly. More things that can be failing: you have to use (and is mandatory) # smbpasswd -L -a USERNAME and # smbpasswd -L -e USERNAME. Get explorer.exe doing it OK first, and fight later the TotalCmd battle.
    – 174140
    Jan 9, 2014 at 16:44
  • That's really frustrating. I just rebooted and it worked (again). Tried the whole day and it did NOT work. Anyway, I applied your suggestion of using smbpasswd. Can I add a user that doesn't exist on the Linux side? The username from the laptop is different, so I have to type the username manually. Would it help if I add that username to smb as well or do I have to create a local user for this? Right now I clicked on the "Save authentication" button in the hope that next time it remebers how to log on. On the other machines I use this and never had problems.
    – Devolus
    Jan 9, 2014 at 17:12

1 Answer 1

0

Please check your network conriguration, in particular if the network adapter is allowed to go in standby mode to save energy.

4
  • How can I do this? Aynway, I don't see why this might help, because it doesn't work always even after rebooting.
    – Devolus
    Jan 9, 2014 at 16:46
  • Just try it. I had a similar problem with a windows 7 client and a NAS smb share. Go to system configurations and then network and sharing center. After you got there click on change adapter settings, then look for you network card that is connected to the network. Right click the network card and open the properties. When that window is open you can press a button "configuration", a new windows appears with different tabs. Choose the last tab "energy management". In this tab there should be an option "allow device to shut down to save energy" or something like that. Disable that option. Jan 9, 2014 at 18:52
  • OK. I disabled that now. Not sure if that might be the cause, because I often use the hibernate mode, so it could well be. Too many variables that all can cause problems... sigh
    – Devolus
    Jan 9, 2014 at 19:03
  • Seems that it helped. I hope so at least. I thought before I found the solution and then it didn't, so I have to wait and see if it happens again.
    – Devolus
    Jan 11, 2014 at 8:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .