Blame tests/p_vsftpd/vsftpd_localusers_login.sh
|
Steve Barnes |
bf9e19 |
#!/bin/sh
|
|
Steve Barnes |
bf9e19 |
# Author: Athmane Madjoudj <athmanem@gmail.com>
|
|
Steve Barnes |
bf9e19 |
|
|
Steve Barnes |
bf9e19 |
t_Log "Running $0 - vsFTPd local user can login test."
|
|
Steve Barnes |
bf9e19 |
|
|
Steve Barnes |
bf9e19 |
# Add a test ftp user
|
|
Steve Barnes |
bf9e19 |
{ userdel -rf ftptest; useradd ftptest && echo ftptest | passwd --stdin ftptest; } &>/dev/null
|
|
Steve Barnes |
bf9e19 |
|
|
Steve Barnes |
bf9e19 |
# Fix SELinux boolean
|
|
Steve Barnes |
bf9e19 |
setsebool ftp_home_dir 1
|
|
Steve Barnes |
bf9e19 |
|
|
Christoph Galuschka |
eb8570 |
echo -e "user ftptest\npass ftptest\nquit" | nc localhost 21 | grep -q "230 Login successful."
|
|
Steve Barnes |
bf9e19 |
|
|
Steve Barnes |
bf9e19 |
t_CheckExitStatus $?
|
|
Athmane Madjoudj |
0b80b5 |
|
|
Athmane Madjoudj |
0b80b5 |
userdel -rf ftptest
|