# samba - swat lässt sich nicht aufrufen

## uhai

Jetzt habe ich mir einen Samba-Server installiert. Den möchte ich über swat konfigurieren, swat startet (localhost:901) aber nicht....

Die smb.conf scheint ok zu sein:

```
testparm smb.conf

Load smb config files from smb.conf

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)

Processing section "[homes]"

Processing section "[printers]"

Loaded services file OK.

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

[global]

        workgroup = MYGROUP

        server string = Samba Server

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

        max log size = 50

        dns proxy = No

        idmap config * : backend = tdb

[homes]

        comment = Home Directories

        read only = No

        browseable = No

[printers]

        comment = All Printers

        path = /var/spool/samba

        printable = Yes

        print ok = Yes

        browseable = No

```

Samba läuft wohl auch:

```

 systemctl status smbd nmbd winbindd

● smbd.service - Samba SMB/CIFS server

   Loaded: loaded (/etc/systemd/system/smbd.service; enabled; vendor preset: enabled)

   Active: active (running) since Fr 2016-01-01 15:40:59 CET; 11min ago

  Process: 1626 ExecStart=/usr/sbin/smbd -D (code=exited, status=0/SUCCESS)

 Main PID: 1736 (smbd)

   CGroup: /system.slice/smbd.service

           ├─1736 /usr/sbin/smbd -D

           └─1769 /usr/sbin/smbd -D

Jan 01 15:40:53 Master_Tux systemd[1]: Starting Samba SMB/CIFS server...

Jan 01 15:40:59 Master_Tux systemd[1]: Started Samba SMB/CIFS server.

● nmbd.service - Samba NetBIOS name server

   Loaded: loaded (/etc/systemd/system/nmbd.service; enabled; vendor preset: enabled)

   Active: active (running) since Fr 2016-01-01 15:40:36 CET; 11min ago

  Process: 848 ExecStart=/usr/sbin/nmbd -D (code=exited, status=0/SUCCESS)

 Main PID: 1134 (nmbd)

   CGroup: /system.slice/nmbd.service

           └─1134 /usr/sbin/nmbd -D

Jan 01 15:40:30 Master_Tux systemd[1]: Starting Samba NetBIOS name server...

Jan 01 15:40:36 Master_Tux systemd[1]: Started Samba NetBIOS name server.

● winbindd.service - Samba Winbind daemon

   Loaded: loaded (/etc/systemd/system/winbindd.service; enabled; vendor preset: enabled)

   Active: active (running) since Fr 2016-01-01 15:40:53 CET; 11min ago

  Process: 1135 ExecStart=/usr/sbin/winbindd -D (code=exited, status=0/SUCCESS)

 Main PID: 1625 (winbindd)

   CGroup: /system.slice/winbindd.service

           ├─1625 /usr/sbin/winbindd -D

           └─1775 /usr/sbin/winbindd -D

Jan 01 15:40:36 Master_Tux systemd[1]: Starting Samba Winbind daemon...

Jan 01 15:40:53 Master_Tux systemd[1]: Started Samba Winbind daemon.

Jan 01 15:40:53 Master_Tux winbindd[1625]: [2016/01/01 15:40:53.605095,  0] winbindd/winbindd_cac...che)

Jan 01 15:40:53 Master_Tux winbindd[1625]:   initialize_winbindd_cache: clearing cache and re-cre...er 2

Hint: Some lines were ellipsized, use -l to show in full.

```

Ich habe die .service angelegt wie hier beschrieben: http://gentoo-en.vfose.ru/wiki/Systemd#Samba. 

Swat ist auch scharfgeschalten:

```
 cat /etc/xinetd.d/swat

# default: off

# description: SWAT is the Samba Web Admin Tool. Use swat \

#              to configure your Samba server. To use SWAT, \

#              connect to port 901 with your favorite web browser.

# $Id$

service swat

{

        port            = 901

        socket_type     = stream

        wait            = no

        only_from       = localhost

        user            = root

        server          = /usr/sbin/swat

        log_on_failure += USERID

#       disable         = yes

        disable         = no

```

Shares werden angezeigt:

```
 smbclient -L MASTER_TUX

Enter root's password: 

Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.25]

        Sharename       Type      Comment

        ---------       ----      -------

        IPC$            IPC       IPC Service (Samba Server)

        Virtual_PDF_Printer Printer   Virtual PDF Printer

        HP_Officejet_Pro_8620_fax Printer   HP_Officejet_Pro_8620_fax

        HP_Officejet_Pro_8620 Printer   HP_Officejet_Pro_8620

        root            Disk      Home Directories

Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.25]

        Server               Comment

        ---------            -------

        MASTER_TUX           Samba Server

        Workgroup            Master

        ---------            -------

        MYGROUP              MASTER_TUX

```

swat lässt sich im Browser weder über die beiden IP-Adressen (zwei Netzwerkkarten), noch als "localhost" oder mit der Domain aufrufen. Woran kann das liegen?

uhai

----------

## uhai

Möglicherweise ist das der zugehörige Bug. Den Workaround würde ich gerne probieren, weiß aber nicht, welche Dateien ich in das neue Verzeichnis kopieren soll. Samba habe ich mit USE=swat & doc installiert.

uhai

----------

