This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1]
1
Installation and Upgrades / Install ProFTPd with LDAP User Authentication
« on: July 08, 2008, 05:49:26 pm »
Hi all.
This HOW-TO will explain how to setup a ProFTPd Server with user authentication against the eBox LDAP User DataBase.
1 - You'll need an Ubuntu 8.04 box with eBox installed and the Users module activated.
2 - Install the proftpd ldap package (sudo apt-get install proftpd-ldap). During the installation, you'll be prompted to choose the way you want proftp to be started (inetd or standalone). Choose Standalone.
3 - Check and write down your eBox LDAP Admin Password (sudo cat /etc/ldap.secret)
4 - Check and write down your server's FQDN (cat /etc/hosts)
5 - Rename your /etc/proftpd/ldap.conf file. Then create a new empty file (sudo touch /etc/proftpd/ldap.conf) and paste the following text in it (replace the words in CAPITAL TEXT with its correct value for your environement)
6 - Rename your /etc/proftpd/proftpd.conf file. Then create a new empty file (sudo touch /etc/proftpd/proftpd.conf) and paste the following text in it (replace the CAPITAL TEXT with its correct value for your environement)
7 - I've noticed that, disableing some unused modules in modules.conf would somehow increase the password verification. So, if you want to try it out, paste the following content in your /etc/proftpd/modules.conf, otherwise, jump to no.8
8 - Restart the ProFTPd Server (sudo /etc/init.d/proftpd restart) and you're on!!!
Some notes:
- For debuging, do "tail -f /var/log/proftpd/proftpd.log" while using the server (be it logging in, logging out, restarting, etc...). You might want to change the "DebugLevel" value in proftpd.conf to it's max (9) so that you can have a more detailed log.
- Files are created with group and others read access. Don't see a problem in this, since the files will be in your home dir.
Post you coment, please!
##########
Post Update (8/06/2008)
- Changed "DefaultRoot" value (to allow access to the group folders, but not allowing the user to get out of /home)
- Added "ServerIdent on "SOME_TEXT"" to hide ftp server's info
##########
Post Update (22/08/2008)
Stuff that wasn't working now works like a charm!
- Doing an "ls" or "dir" now shows the group that owns the object
- Root folder as /home/samba now working, instead of sending the user to it's true home, unallowing him to browse the group dir's
This HOW-TO will explain how to setup a ProFTPd Server with user authentication against the eBox LDAP User DataBase.
1 - You'll need an Ubuntu 8.04 box with eBox installed and the Users module activated.
2 - Install the proftpd ldap package (sudo apt-get install proftpd-ldap). During the installation, you'll be prompted to choose the way you want proftp to be started (inetd or standalone). Choose Standalone.
3 - Check and write down your eBox LDAP Admin Password (sudo cat /etc/ldap.secret)
4 - Check and write down your server's FQDN (cat /etc/hosts)
5 - Rename your /etc/proftpd/ldap.conf file. Then create a new empty file (sudo touch /etc/proftpd/ldap.conf) and paste the following text in it (replace the words in CAPITAL TEXT with its correct value for your environement)
Quote
# ProFTPd LDAP Module for eBox Platform
<IfModule mod_ldap.c>
LDAPServer localhost
LDAPDNInfo cn=admin,dc=ebox YOUR_EBOX_LDAP_ADMIN_PASSWORD
LDAPDoAuth on "ou=Users,dc=ebox" (&(uid=%v)(objectclass=posixAccount))
LDAPDoUIDLookups on "ou=Users,dc=ebox"
LDAPDoGIDLookups on "ou=Groups,dc=ebox"
</IfModule>
6 - Rename your /etc/proftpd/proftpd.conf file. Then create a new empty file (sudo touch /etc/proftpd/proftpd.conf) and paste the following text in it (replace the CAPITAL TEXT with its correct value for your environement)
Quote
# ProFTPd config file for eBox LDAP authentication
Include /etc/proftpd/modules.conf
UseIPv6 off
ServerName "SOME TEXT"
ServerType standalone
ServerIdent on "SOME TEXT FOR PEOPLE NOT TO SEE THIS IS PROFTP RUNNING"
DeferWelcome off
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
#DisplayLogin welcome.msg
#DisplayChdir .message true
ListOptions "-l"
DenyFilter \*.*/
# Use this to jail all users in their homes
DefaultRoot /home/samba
DefaultChDir samba
# Required for eBox LDAP User Auth
RequireValidShell off
Port 21
# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts 49152 65534
# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress 1.2.3.4
# Only for StandAlone Mode
MaxInstances 30
# Set the user and group that the server normally runs at.
User proftpd
Group nogroup
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
# PersistentPasswd off
# This is required to use both PAM-based authentication and local passwords
# AuthOrder *mod_auth_pam.c mod_auth_unix.c
# AuthOrder mod_ldap.c
# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile off
#<IfModule mod_sql.c>
# SQLBackend mysql
#</IfModule>
TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log
#<IfModule mod_quotatab.c>
#QuotaEngine off
#</IfModule>
#<IfModule mod_ratio.c>
#Ratios off
#</IfModule>
# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default.
#<IfModule mod_delay.c>
#DelayEngine on
#</IfModule>
#<IfModule mod_ctrls.c>
#ControlsEngine off
#ControlsMaxClients 2
#ControlsLog /var/log/proftpd/controls.log
#ControlsInterval 5
#ControlsSocket /var/run/proftpd/proftpd.sock
#</IfModule>
#<IfModule mod_ctrls_admin.c>
#AdminControlsEngine off
#</IfModule>
Include /etc/proftpd/ldap.conf
#Include /etc/proftpd/sql.conf
DebugLevel 3
7 - I've noticed that, disableing some unused modules in modules.conf would somehow increase the password verification. So, if you want to try it out, paste the following content in your /etc/proftpd/modules.conf, otherwise, jump to no.8
Quote
#
# This file is used to manage DSO modules and features.
#
# This is the directory where DSO modules reside
ModulePath /usr/lib/proftpd
# Allow only user root to load and unload modules, but allow everyone
# to see which modules have been loaded
ModuleControlsACLs insmod,rmmod allow user root
ModuleControlsACLs lsmod allow user *
#LoadModule mod_ctrls_admin.c
#LoadModule mod_tls.c
#LoadModule mod_sql.c
LoadModule mod_ldap.c
#
# 'SQLBackend mysql' or 'SQLBackend postgres' directives are required
# to have SQL authorization working. You can also comment out the
# unused module here, in alternative.
#
#LoadModule mod_sql_mysql.c
#LoadModule mod_sql_postgres.c
#LoadModule mod_radius.c
LoadModule mod_quotatab.c
LoadModule mod_quotatab_file.c
LoadModule mod_quotatab_ldap.c
#LoadModule mod_quotatab_sql.c
#LoadModule mod_quotatab_radius.c
LoadModule mod_wrap.c
LoadModule mod_rewrite.c
LoadModule mod_load.c
LoadModule mod_ban.c
LoadModule mod_wrap2.c
LoadModule mod_wrap2_file.c
#LoadModule mod_wrap2_sql.c
# keep this module the last one
LoadModule mod_ifsession.c
8 - Restart the ProFTPd Server (sudo /etc/init.d/proftpd restart) and you're on!!!
Some notes:
- For debuging, do "tail -f /var/log/proftpd/proftpd.log" while using the server (be it logging in, logging out, restarting, etc...). You might want to change the "DebugLevel" value in proftpd.conf to it's max (9) so that you can have a more detailed log.
- Files are created with group and others read access. Don't see a problem in this, since the files will be in your home dir.
Post you coment, please!
##########
Post Update (8/06/2008)
- Changed "DefaultRoot" value (to allow access to the group folders, but not allowing the user to get out of /home)
- Added "ServerIdent on "SOME_TEXT"" to hide ftp server's info
##########
Post Update (22/08/2008)
Stuff that wasn't working now works like a charm!
- Doing an "ls" or "dir" now shows the group that owns the object
- Root folder as /home/samba now working, instead of sending the user to it's true home, unallowing him to browse the group dir's
2
Installation and Upgrades / eBox with FTP Server
« on: April 22, 2008, 01:21:26 pm »
Hi there. Simple question: are there plans to include ftp server software with LDAP auth in eBox? In my case it would be very handy, because it would allow the users to access their files when on a remote public location, and the linux users would prefer this method to upload and download files to their homes on the server. Sure, I could use the new public_html feature, but prefer FTP (also because of the upload thing). I've already tried to do this with the proftpd-ldap package in the repository for 0.11.99, but couldn't managed to get it done (don't know if it is because it's an old version of ProFTP...).
PS: could you include the ftp command in the next releases? until now, this packages doesn't come installed and it can't be installed (dependency problems), and it's quite a handy tool...
Thanks
PS: could you include the ftp command in the next releases? until now, this packages doesn't come installed and it can't be installed (dependency problems), and it's quite a handy tool...
Thanks
Pages: [1]