View previous topic :: View next topic |
Author |
Message |
jacek4000 Member
Joined: 04 Oct 2008 Posts: 28
|
Posted: Mon Oct 06, 2008 9:22 pm Post subject: proftpd probelm with users |
|
|
When I put a new user in our system with adduser it is not recognized by proftpd.
When I want to login with the new user I got an information
Bad password.
Please help |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Oct 07, 2008 6:18 am Post subject: |
|
|
Adduser script doesn't add users to proftp.
Use the script bellow to add your users to proftpd, you can alter it to your needs.
Another thing, do a
sed -e "s,DisplayFirstChdir,DisplayChdir,g" -i /etc/proftpd.conf
before to not displaying the annoying message
"- warning: the DisplayFirstChdir directive is deprecated and will be removed in a future release. Please use the DisplayChdir directive."
Code: | #!/bin/bash
if [$USERNAME = ""]; then
echo "Choose FTP User"
read USERNAME
usermod -g nobody $USERNAME
fi
if [$FTPPATH = ""]; then
echo "Choose your FTP Share Path For $USERNAME"
read FTPPATH
fi
mkdir -p $FTPPATH
chmod 777 $FTPPATH
echo "<Anonymous $FTPPATH>
User $USERNAME
Group nobody
AnonRequirePassword on
MaxClients 5 \"The server is full, hosting %m users\"
DisplayLogin welcome.msg
DisplayChdir .msg
UserRatio $USERNAME 0 0 0 0
<Limit LOGIN>
Allow from all
Deny from all
</Limit>
AllowOverwrite on
<Limit LIST NLST STOR STOU APPE RETR RNFR RNTO DELE MKD XMKD SITE_MKDIR RMD XRMD SITE_RMDIR SITE_CHMOD PWD XPWD SIZE STAT CWD XCWD CDUP XCUP >
AllowAll
</Limit>
<Limit SITE SITE_CHMOD SITE_CHGRP MTDM >
DenyAll
</Limit>
</Anonymous>" >> /etc/proftpd.conf
echo "Applying Changes"
kill `cat /var/run/proftpd.pid`
/usr/sbin/proftpd -c /etc/proftpd.conf
|
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
jacek4000 Member
Joined: 04 Oct 2008 Posts: 28
|
Posted: Tue Oct 07, 2008 10:09 am Post subject: Thanks |
|
|
Thanks for help |
|
Back to top |
|
jacek4000 Member
Joined: 04 Oct 2008 Posts: 28
|
Posted: Tue Oct 14, 2008 10:54 pm Post subject: An error appears |
|
|
After useing this script an error apear:
- Fatal: unknown configuration directive '<Limit' on line 123 of '/etc/proftpd.conf'
What does it mean |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed Oct 15, 2008 6:31 am Post subject: |
|
|
post your /etc/proftpd.conf 120-124 lines.
Most likely when you copy the script you probably make a new line somewhere.
If you used putty open it at full screen for paste the script.
Just place <Limit ... > in one line.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
|