# vsFTPd and PAM

## Highlands

I can't get my local users to log in

I get this in my log-file

```
Feb 27 21:38:24 [xinetd] START: ftp pid=16689 from=192.168.1.4

Feb 27 21:38:26 [vsftpd] PAM-listfile: Refused user root for service vsftpd

Feb 27 21:38:29 [xinetd] EXIT: ftp pid=16689 duration=5(sec)

```

What is wrong?

----------

## j-m

IIRC you cannot login as root in default vsftpd configuration and this must be explicitly allowed, which is not a good idea anyway. Don´t test with root account!

----------

## Highlands

```
Feb 27 22:12:22 [xinetd] START: ftp pid=25827 from=192.168.1.10

Feb 27 22:12:22 [vsftpd] PAM-listfile: Refused user www for service vsftpd

Feb 27 22:12:24 [xinetd] EXIT: ftp pid=25827 duration=2(sec)

```

----------

## j-m

OMG! Test with real user, not www or any other system/root accounts.  :Rolling Eyes: 

----------

## Highlands

It seems that the users with a /bin/false shell doesn't log in...

I have removed the line:

```
 #auth     required   /lib/security/pam_shells.so
```

without any success

any cloues?

----------

## j-m

Users with /bin/false are not normal users. Why on earth don´t you create a normal vanilla test user account? Don´t you have any real users on your system? Why are you setting up an FTP server then  :Question:   :Exclamation:   :Rolling Eyes: 

----------

## Highlands

it works with my normal shell user but this user with /bin/false as shell 

Because i need this user to access the /var/www/localhost/htdocs to have FTP access to my homepage

----------

## j-m

 *Highlands wrote:*   

> 
> 
> Because i need this user to access the /var/www/localhost/htdocs to have FTP access to my homepage

 

So set /var/www/localhost/htdocs as his home directory, use chroot_local_user=YES and give him normal shell.  :Confused: 

----------

## j-m

And my last idea:

```

echo "/bin/false" >> /etc/shells

```

----------

## Highlands

/etc/passwd

```
www:x:1001:81::/var/www/localhost/htdocs:/bin/bash
```

/etv/vsftpd/vsftpd.conf

```
chroot_local_user=YES

anonymous_enable=NO

local_enable=YES

write_enable=YES

dirmessage_enable=YES

connect_from_port_20=YES

xferlog_enable=YES

xferlog_file=/var/log/vsftpd/vsftpd.log

nopriv_user=nobody

```

I can't find the problem

----------

## j-m

What are the permissions for /var/www/localhost/htdocs  :Question: 

----------

## Highlands

drwxrwxr-x  3 www  apache  624 Feb 28 11:36 htdocs

----------

## j-m

OK, maybe vsftpd is so very secure that it won´t let you log in, maybe it does not like user "www", I don´t know. I am using pureftpd and have never had such obscure problems. Sorry I could not help.

----------

