LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   accessing a samba server (top level) from win7 (https://www.linuxquestions.org/questions/slackware-14/accessing-a-samba-server-top-level-from-win7-941122/)

nass 04-22-2012 09:19 AM

accessing a samba server (top level) from win7
 
hello everyone,
this has been bugging me for months, years really.

I have setup my samba server with security user. this enables accessing shares by providing credentials - so far i always had to provide the credentials PRIOR to my first access on any of the shares.
so if i navigate to my samba server (through 'network') from win7 client pc, i will have to input my creds and then the shares will be listed.

Here I am though sitting in front of the same win7 pc and accessing a Western digital network disk. If i navigate to the WD in the same way, i'll get the list of the shares!!! if i click on any of these shares that is not public, i'll get the creds window - this is fine and expected.

I have checked again and again the 2 smb.conf files for ANY variables I don't know about and have googled endlessly to find a cure.

My smb.conf as is now, works as I would like it too in windows XP. but not in windows 7. The WD disk works in both win7 and winXP clients fine.

I am dumping both configs here and pray that you have a solution :) - samba mailing list has not been helpful.

Code:

[global]
        workgroup = SKAILS
        netbios aliases = starpool
        server string = Samba Server
        security = user
        map to guest = Bad User
        null passwords = Yes
        encrypt passwords = yes
#      client NTLMv2 auth = Yes
        log file = /var/log/samba/samba.%m
        max log size = 50
#      min protocol = LANMAN1
        unix extensions = No
        socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
        load printers = No
        os level = 33
        preferred master = Yes
        wins proxy = Yes
        wins support = Yes
        hide special files = Yes
        wide links = Yes
        public = yes

[Public]
        comment = a public for all folder
        path = /mnt/lvm/public
        force group = shares
        read only = No
        acl group control = Yes
        create mask = 0644
        directory mask = 0775
        inherit acls = Yes
        guest ok = Yes
        vfs objects = recycle
        recycle:keeptree = yes
        recycle:touch = yes
        recycle:exclude = *.tmp
        recycle:repository = /mnt/lvm/netrecbin/public
        recycle:versions = yes

[netRecycleBin]
        comment = Network Recycle Bin
        path = /mnt/lvm/netrecbin

[winmx]
        path = /mnt/hd/data/winmx
        force group = shares
        valid users = @shares
        write list = @shares
        read only = No
        acl group control = Yes
        directory mask = 0775
        inherit permissions = Yes
        inherit acls = Yes
        inherit owner = Yes

[homes]
        comment = home directories
        read only = No
        browseable = No
        vfs objects = recycle
        recycle:keeptree = yes
        recycle:touch = yes
        recycle:exclude = *.tmp
        recycle:repository = /mnt/lvm/netrecbin/homes
        recycle:versions = yes

[applications]
        comment = Application binaries
        path = /mnt/hd/data/appz
        guest ok = Yes

[photos]
        comment = Photographs
        path = /mnt/hd/data/photos
        guest ok = Yes

[Music]
        comment = Mp3's
        path = /mnt/hd/data/music
        guest ok = Yes

this is the WD disk smb.conf (and an included file follows)

Code:

[global]
  workgroup = SKAILS
  realm = SKAILS
  netbios name = TeraTsom
  server string = NAS-WDworldEditionI
  load printers = no
  printing = bsd
  printcap name = /dev/null
  disable spoolss = yes
  log file = /var/log/samba/log.smbd
  max log size = 50
  max xmit = 65536
  dead time = 15
  security = user
  auth methods = guest, sam_ignoredomain, winbind:ntdomain
  encrypt passwords = yes
  create mask = 0664
  directory mask = 0775
  local master = no
  socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
  use mmap = yes
  use sendfile = yes
  dns proxy = no
  idmap uid = 10000-65000
  idmap gid = 10000-65000
  dont descend = /proc,/dev,/etc
  admin users =
  null passwords = yes
  map to guest = bad user
  guest account = nobody
  include = /usr/private/user_smb_conf/.overall_share
[Configuration]
  path = /Configuration
  comment = System Configuration
  public = yes
  browseable = yes
  writable = no
  guest ok = yes

this is the included file of the WD smb.conf
Code:

[Download]
  path = /DataVolume/Download
  comment = Download Share
  preallocate = yes
  public = yes
  browseable = yes
  writable = yes
  guest ok = yes
  map read only = no
[Public]
  path = /DataVolume/Public
  comment = Public Share
  preallocate = yes
  public = yes
  browseable = yes
  writable = yes
  guest ok = yes
  map read only = no
[backup]
  path = /DataVolume/backup
  comment =
  preallocate = yes
  public = yes
  browseable = yes
  writable = yes
  guest ok = yes
  map read only = no
[off_backup]
  path = /DataVolume/off_backup
  comment =
  preallocate = yes
  public = yes
  browseable = yes
  writable = yes
  guest ok = yes
  map read only = no

Thank you in advance for your time

allend 04-22-2012 09:36 AM

Is your question "Why does Win7 allow access to shares without requesting credentials?"? If so, it is because the Windows operating system has a nasty habit of caching login information.

nass 04-22-2012 09:57 AM

so the answer was simple but came from a completely different tool:
smbpasswd.

I would have my username (same for win7 and samba) set to an empty password, as

Quote:

smbpasswd -a <username>
which is different to an empty password

Quote:

smbpasswd -an <username>

adding the user nobody is also helpful in this way.

win7 seems to be sending empty password in order to get the list of shares

EDIT: here is the source of the idea http://serverfault.com/questions/903...nstead-of-give

nass 04-22-2012 11:30 AM

Quote:

Originally Posted by allend (Post 4659884)
Is your question "Why does Win7 allow access to shares without requesting credentials?"? If so, it is because the Windows operating system has a nasty habit of caching login information.

The exact oppposite allend, why does it not let me see the top level of the shares when i see it happening in another samba server..


All times are GMT -5. The time now is 11:25 PM.