# Configuring Samba

## Onimi

I could use some help using Samba to set up file sharing in my apartments Windows LAN.  My roommate, who is also running a Gentoo box and KDE had no trouble getting his to see the windows network folders or share his own files, yet a samba.conf file that is as identical to his as we could manage without copying and pasting does nothing for me.  Here is my samba.conf:

 *Quote:*   

> 
> 
> [global]
> 
>    workgroup = 3317 PARKVIEW
> ...

 

(This is essentially the samba.conf.example file, with minimal changes)

Also notable is that when trying to use KDE's GUI front-end for Samba, adding a user did not work at all. I would add myself, then exit and re-enter to find the user window again empty.

Thanks for the help!

----------

## yawm

What does your logfile say?

```
/var/log/samba-log.*
```

----------

## skormel

My smb.conf is:

```

powerbook ~ # cat /etc/samba/smb.conf

[global]

        netbios name = Powerbook

        workgroup = Casa

        os level = 64

        preferred master = yes

        domain master = yes

        local master = yes

        security = shares

        encrypt passwords = true

        domain logons = yes

        logon script = netlogon.bat

        log file = /usr/local/samba/var/log.%m

        max log size = 50

   

[skormel]

        comment = skormel

        path = /home/skormel

        public = yes

        writable = no

        printable = no

        guest ok = yes

```

This configuration works perfect for me, with the others gentoo, debian, windows y macosx machines.

----------

## RAPHEAD

Try to type the following in the explorer bar:

\\<IP of your samba server>\[Optional Sharename]

and see what happens

----------

## Onimi

 *yawm wrote:*   

> What does your logfile say?
> 
> ```
> /var/log/samba-log.*
> ```
> ...

 

/var/log/samba.log is empty

However, in the folder /var/log/samba there's a couple of log files.

log.<myname> has this message repeated 5 or 6 times:

 *Quote:*   

> [2006/11/05 19:54:51, 0] lib/util_sock.c:write_data(557)
> 
>   write_data: write failure in writing to client 0.0.0.0. Error Connection reset by peer
> 
> [2006/11/05 19:54:51, 0] lib/util_sock.c:send_smb(765)
> ...

 

log.nmbd has this:

 *Quote:*   

> 
> 
> [2006/11/02 09:35:49, 0] nmbd/nmbd.c:main(727)
> 
>   Netbios nameserver version 3.0.22 started.
> ...

 

and, log.smbd has this:

 *Quote:*   

> [2006/11/02 09:35:46, 0] smbd/server.c:main(805)
> 
>   smbd version 3.0.22 started.
> 
>   Copyright Andrew Tridgell and the Samba Team 1992-2006
> ...

 

As an FYI, I am very new to both linux and samba, so I don't know much about configuration.

Raphead: I didn't think I was setting a server per se- how can I check the Samba IP?

----------

## RAPHEAD

well the Samba IP is the ip address of your samba server,

you can find out by typing "ifconfig"

----------

## Onimi

 *RAPHEAD wrote:*   

> well the Samba IP is the ip address of your samba server,
> 
> you can find out by typing "ifconfig"

 

 *Quote:*   

> eth0      Link encap:Ethernet  HWaddr 00:C0:F0:6A:F2:8B
> 
>           inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
> 
>           UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
> ...

 

----------

## nobspangle

uncomment this line 

```
; netbios name = Mike_Linux
```

Your server doesn't have a proper name

What are you trying to share? if you want the system to just work try something like this.

```

[global]

workgroup=3317PARKVIEW

netbios name = Mike_Linux 

map to guest = bad user

wins support = yes

domain master = yes

local master = yes

os level = 50

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

server string = Pants make the man

unix charset = iso8859-1

[storage]

path = /mnt/storage

guest ok = yes

writeable = yes

create mask = 650

directory mask = 750

force user = fuzz

force group = users
```

Make sure all your windows PCs are set to use the samba server as their wins server. The unix user fuzz has full access to the /mnt/storage directory

----------

## Onimi

 *nobspangle wrote:*   

> uncomment this line 
> 
> ```
> ; netbios name = Mike_Linux
> ```
> ...

 

I'm trying to add this linux box to a preexisting windows LAN, so I can transfer files from other machines to and from this one.  I tried this code, and I can now see it in my windows workgroup. However, I can't access it from my windows box, nor can my linux box see anything else (I'm using Konquerer -> network folders to try to see the other shared computers).

Apologies if I'm not explaining my situation very well; I'm very new to both Linux and networking.

----------

