Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
proftpd probelm with users
View previous topic :: View next topic  
Author Message
jacek4000
Member


Joined: 04 Oct 2008
Posts: 28

PostPosted: Mon Oct 06, 2008 9:22 pm    Post subject: proftpd probelm with users Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Tue Oct 07, 2008 6:18 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jacek4000
Member


Joined: 04 Oct 2008
Posts: 28

PostPosted: Tue Oct 07, 2008 10:09 am    Post subject: Thanks Reply with quote

Thanks for help
Back to top
View user's profile Send private message
jacek4000
Member


Joined: 04 Oct 2008
Posts: 28

PostPosted: Tue Oct 14, 2008 10:54 pm    Post subject: An error appears Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Wed Oct 15, 2008 6:31 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional