# swat auth error (have searched)

## apanjocko

i have emerged samba + xinetd + swat, configured xinetd, and i have run smbpasswd -a root.

i can connect but i cannot login. searching the forum it seems people forget to run smbpasswd, but i have done this numerous times.

i have tried both samba and system accounts, from both localhost and a computer next by. auth error no matter what i try...

i.e:

PAM_smbpass[...]. failed auth request by root for servie samba as root

smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User root !

i do type the correct password.

please help, i can't get no sleep  :Smile: 

/D

----------

## Scorpion265

I'm having the same exact problem, I was just about to post it when i saw this. Same error in the swat log and everything. If anyone can help please do!

 *apanjocko wrote:*   

> i have emerged samba + xinetd + swat, configured xinetd, and i have run smbpasswd -a root.
> 
> i can connect but i cannot login. searching the forum it seems people forget to run smbpasswd, but i have done this numerous times.
> 
> i have tried both samba and system accounts, from both localhost and a computer next by. auth error no matter what i try...
> ...

 

----------

## Scorpion265

This is a shameless bump, please help! I can't use my samba server properly, I don't know all the config file ins and outs and I REALLY don't want to have to learn it manually.

----------

## heyodee

hi,

I had thesame problem. So I checked the logs, found the problem, and edited pam.

Edit your /etc/pam.d/samba to contain the lines below:

auth       required     pam_nologin.so

auth       required     pam_stack.so service=system-auth

account    required     pam_stack.so service=system-auth

session    required     pam_stack.so service=system-auth

 *Scorpion265 wrote:*   

> I'm having the same exact problem, I was just about to post it when i saw this. Same error in the swat log and everything. If anyone can help please do!
> 
>  *apanjocko wrote:*   i have emerged samba + xinetd + swat, configured xinetd, and i have run smbpasswd -a root.
> 
> i can connect but i cannot login. searching the forum it seems people forget to run smbpasswd, but i have done this numerous times.
> ...

 

----------

## Scorpion265

My question is what changed recently to break this? I have never had a problem with samba + swat before... Also, this doesn't disable the checking of users vs pam does it?

----------

## sneakers563

Exact same problem here.  smbpasswd -a root makes absolutely no difference.  Pam rejects the login.  What's going on here?

----------

## tosk

Have you enabled the root user?

```
smbpasswd -e root
```

----------

## apanjocko

here is another guy with the same problem.

https://forums.gentoo.org/viewtopic-t-346375-highlight-swat.html

smbpasswd -e root doesn't help

editing pam for smb doesn't help

i have same password for samba root as system root

so, it is not us -- we just have to wait until enough people have problems with this so it'll get fixed :-/

----------

## sneakers563

Another thing is that I've used Swat successfully with Gentoo in the past, so adding/enabling users with smbpasswd isn't anything new to me.  I've never had this problem in the past, and I don't think I'm doing anything differently this time.

----------

## apanjocko

i thought i should give it another try and tried the "insecure workaround" mentioned here:

https://forums.gentoo.org/viewtopic-p-87876.html#87876

funny enough, this still doesn't work for me. i have restarted xinetd after adding server_args = -a to the swat-xinetd cofig file. it still asks for username/password, and gives me auth error.

please help.

----------

## apanjocko

i unmerged it and re-emerged it and suddenly it all worked. something went wrong during the emerge i guess. even the server-args worked now  :Smile: 

----------

## svenk

got the same error, same logs, same swat. After re-emerging samba (now using samba-3.0.20b)) connecting to swat doesn't work anymore (before updating it worked just fine with user root, and he didn't even got a smb-account/smb-passwort.).

Since the update I am using the mysql-passdb-backend, and normal connecting to samba just works fine, but swat doesn't. Maybe I've to edit this /etc/pam.d/samba-File?

```

#%PAM-1.0

# * pam_smbpass.so authenticates against the smbpasswd file

# * [...]

auth       required     pam_smbpass.so nodelay

account    include      system-auth

session    include      system-auth

password   required     pam_smbpass.so nodelay smbconf=/etc/samba/smb.conf

```

Sven

----------

