# swat login (localhost:901) refused as root !!!

## H-Dragon

i want to connect to swat and it asks me for authentification... 

i give it my root + pw  and it says error 401 !!!

whats wrong???

----------

## H-Dragon

possible solution:

```

su

**********

smbpasswd

```

and just ignore all the error messages!!!

----------

## microbrain

Here's my .02.

These tips are DEFINATELY not meant to be complete, I just wrote them to help people who just got started on the right track.

1) install samba (NO kidding)  My version is 2.2.7

```
emerge samba
```

2) creating the samba configuration file (smb.conf) by copying the example configuration file:

```
cd /etc/samba

cp smb.conf.example smb.conf
```

3) create the smbpasswd file: (this command asks for your password a couple of times)

```
smbpasswd
```

NOTE: this will fail if the user isn't in the smbpasswd file (of if that file doesn't exist). If this is the case, try

```
smbpasswd -a
```

4) Enable swat: in /etc/xinetd.d/swat, change the line with the disabled keyword... It should read:

```
disable = no
```

(re)start xinet:

```
/etc/init.d/xinetd restart
```

5) point your browser to http://localhost:901

Good luck...

If you have more problems, don't hesitate to ask, I usually monitor my posts

----------

## microbrain

 *H-Dragon wrote:*   

> possible solution:
> 
> ```
> 
> su
> ...

 

Ignoring error messages is generally not a good idea...

If smbpasswd gives you the error:

```
Failed to find entry for user root.

Failed to modify password entry for user root
```

try using

```
smbpasswd -a
```

----------

## dj_choco

microbrain wrote:

 *Quote:*   

>  Enable swat: in /etc/xinetd.d/swat, change the line with the disabled keyword... It should read:
> 
> ```
> disable = no
> ```
> ...

 

Do I *have* to use inetd/xinetd with swat?

Under /etc/init.d/ I have an  inetd entry. Do I unmerge inetd and then emerge xinetd?

I just tried to unmerge inetd:

```

!!! Couldn't find match for inetd

>>> unmerge: No packages selected for removal.
```

 :Confused: 

----------

## UnderScore

Unless you have a real good reason to use inetd, you probably don't want to replace it

Using the xinetd program for system administration

http://www-106.ibm.com/developerworks/library/l-xinetd/?open&t=grl,l=805,p=xinetd

----------

## kashani

inetd is probably an artifact for things that expect it and not xinetd. In any case you can ignore it. The other thing to remember is to remove the line about localhost only from you /etc/xinetd.conf

kashani

----------

## dj_choco

@UnderScore

@kashani

Thank you! As soon as I can I will see if this works.

----------

## _Edulix

```
bash-2.05a# locale xinetd

bash-2.05a# /etc/init.d/xinetd restart

bash: /etc/init.d/xinetd: No existe el fichero o el directorio

bash-2.05a# locale xinetd

bash-2.05a#
```

This gives me the console.  What can I do ?  I use Gentoo 1.2 and I have installed samba.

----------

## dj_choco

 *_Edulix wrote:*   

> 
> 
> ```
> bash-2.05a# locale xinetd
> 
> ...

 

Is xinetd installed?

```

emerge sync

emerge xinetd

rc-update add xinetd default // if you want xinetd to start in the default run level
```

Now, /etc/init.d/xinetd start should work.

----------

## robfish

Microbrain's procedure helped me.

I could not seem to start Samba but by following his instructions (and finding that xinetd was not installed) I was able to get SWAT working and then start samba OK.

Thanks.  :Very Happy: 

----------

## dj_choco

@microbrain

Thank you! SWAT is up.

----------

## rauar

 *_Edulix wrote:*   

> 
> 
> ```
> bash-2.05a# locale xinetd
> 
> ...

 

Think you meant "locate" and not "locale". (Just a hint)

Regards Al

----------

## dericmil

see: https://forums.gentoo.org/viewtopic.php?t=57924&highlight=swat

----------

