Samba frustrations

Preston Hagar prestonh at gmail.com
Thu Sep 9 16:25:30 UTC 2010


On Wed, Sep 8, 2010 at 6:56 PM,  <pkaplan1 at comcast.net> wrote:
> I'm trying to set up a samba server on lucid (kubuntu) and connect to it
> (mostly) from a win7 machine.  The win7 machine and server are both in the
> same workgroup.
> The problem is that the server is not displayed in the win7 networking page.
> As a matter of fact, when I attach another kubuntu machine to the network,
> smbclient doesn't see the server either.  So I assume something is wrong
> with the server config.
> The smb.conf file is below.
> Any ideas what's wrong?
> TIA
> Paul
> [global]
<snip>
> #======================= Share Definitions =======================
> # Un-comment the following (and tweak the other settings below to suit)
> # to enable the default home directory shares.  This will share each
> # user's home directory as \\server\username
> ;[homes]
> ;   comment = Home Directories
> ;   browseable = no
> # By default, the home directories are exported read-only. Change the
> # next parameter to 'no' if you want to be able to write to them.
> ;   read only = yes
> # File creation mask is set to 0700 for security reasons. If you want to
> # create files with group=rw permissions, set next parameter to 0775.
> ;   create mask = 0700
> # Directory creation mask is set to 0700 for security reasons. If you want
> to
> # create dirs. with group=rw permissions, set next parameter to 0775.
> ;   directory mask = 0700
> # By default, \\server\username shares can be connected to by anyone
> # with access to the samba server.  Un-comment the following parameter
> # to make sure that only "username" can connect to \\server\username
> # This might need tweaking when using external authentication schemes
> ;   valid users = %S
> # Un-comment the following and create the netlogon directory for Domain
> Logons
> # (you need to configure Samba to act as a domain controller too.)
> ;[netlogon]
> ;   comment = Network Logon Service
> ;   path = /home/samba/netlogon
> ;   guest ok = yes
> ;   read only = yes
> ;   share modes = no
> # Un-comment the following and create the profiles directory to store
> # users profiles (see the "logon path" option above)
> # (you need to configure Samba to act as a domain controller too.)
> # The path below should be writable by all users so that their
> # profile directory may be created the first time they log on
> ;[profiles]
> ;   comment = Users profiles
> ;   path = /home/samba/profiles
> ;   guest ok = no
> ;   browseable = no
> ;   create mask = 0600
> ;   directory mask = 0700
> [printers]
> comment = All Printers
> browseable = no
> path = /var/spool/samba
> printable = 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
> [Dumbledore-share]
> read only = no
> path = /home/pkaplan/share
>

In your share definitions, I don't see anything to make any of them
browseable or accessible to non-authenticated users.  Try under your
[Dumbledore-share] adding the following:

browseable = yes
public = yes
guest ok = yes

You may not want that for long term security (depending on your
ultimate goals), but that should make the share show up on other
machines, even if you don't authenticate.  Also, on your Win7 machine,
try going to Windows explorer and typing \\<ipaddress>  where
<ipaddress> is replaced with the ip of your samba server.  Some
Windows machines can be a real pain to get them to see samba machines
through general network browsing.

If it helps, below is my full smb.conf file for my home server.  I
know a lot of people will say it is overly insecure or whatever, but I
am aware of that and not concerned.  Basically, my main goal with it
is to share out a directory called "samba" as a share names files to
any machine on my network, without a need for a password or anything
else.  Anyway, it might be good to start from and then add in security
options until you are where you want to be.

[global]
        server string = %h server
        security = SHARE
        obey pam restrictions = Yes
        passdb backend = tdbsam
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n *passwd:*password\supdated\ssucce\
ssfully* .
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        dns proxy = No
        panic action = /usr/share/samba/panic-action %d
        invalid users = root

[files]
        comment = files
        path = /var/data/samba
        read only = No
        create mask = 0777
        directory mask = 0777
        guest only = Yes
        guest ok = Yes
        hosts allow = 192.168.1.
        share modes = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        create mask = 0700
        printable = Yes
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers




More information about the ubuntu-users mailing list