Proftpd/mysql on Etch fails PAM after upgrade

Discussion in 'HOWTO-Related Questions' started by slapaf, Oct 28, 2008.

  1. slapaf

    slapaf New Member

    I followed the Proftpd/mysql -etch and everything worked fine. Then a few days ago I noticed it had stoppped working. Only thing I can think of doing on the server is apt-get upgrade.

    Here is proftpd.log
    Oct 28 13:47:54 proftpd[2473] ([]): FTP session opened.
    Oct 28 13:47:57 proftpd[2473] ([]): PAM(shop): User not known to the underlying authentication module.
    Oct 28 13:47:57 proftpd[2473] ([]): USER shop: Login successful.
    Oct 28 13:47:57 proftpd[2473] ([]): Preparing to chroot to directory '/var/www/shop'
    Here is auth.log

    Oct 28 13:47:54 sds proftpd: (pam_unix) check pass; user unknown
    Oct 28 13:47:54 sds proftpd: (pam_unix) authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
    Here is proftpd.conf:
    # To really apply changes reload proftpd after modifications.
    # Includes DSO modules
    Include /etc/proftpd/modules.conf
    UseIPv6                         off
    ServerName                      "Debian"
    ServerType                      standalone
    DeferWelcome                    off
    MultilineRFC2228                on
    DefaultServer                   on
    ShowSymlinks                    on
    TimeoutNoTransfer               600
    TimeoutStalled                  600
    TimeoutIdle                     1200
    DisplayLogin                    welcome.msg
    DisplayFirstChdir               .message
    ListOptions                     "-l"
    DenyFilter                      \*.*/
    tcpNoDelay                      on
    IdentLookups                    off
    UseReverseDNS                   off
    # Port 21 is the standard FTP port.
    Port                            21
    # feel free to use a more narrow range.
    # PassivePorts                    49152 65534
    # that allows you to limit maximum number of processes per service
    # (such as xinetd)
    MaxInstances                    30
    #User                           proftpd
    #Group                          nogroup
    User                            ftpuser
    Group                           ftpgroup
    # (second parm) from being group and world writable.
    Umask                           022  022
    # Normally, we want files to be overwriteable.
    AllowOverwrite                  on
    # PersistentPasswd              off
    # in downloads. That is not needed for uploads rates.
    # UseSendFile                   off
    TransferLog /var/log/proftpd/xferlog
    SystemLog   /var/log/proftpd/proftpd.log
    <IfModule mod_tls.c>
    #TLSEngine off
    <IfModule mod_quota.c>
    #QuotaEngine on
    <IfModule mod_ratio.c>
    #Ratios on
    # It is on by default.
    <IfModule mod_delay.c>
    #DelayEngine off
    <IfModule mod_ctrls.c>
    ControlsEngine        on
    ControlsMaxClients    2
    ControlsLog           /var/log/proftpd/controls.log
    ControlsInterval      5
    ControlsSocket        /var/run/proftpd/proftpd.sock
    <IfModule mod_ctrls_admin.c>
    AdminControlsEngine on
    DefaultRoot ~
    Include /etc/proftpd/mysql.conf
    RootLogin off
    RequireValidShell off
    Here is mysql.conf (included in proftpd.conf)
    # Force the use of mysql backend
    SQLBackend                      mysql
    # The passwords in MySQL are using its own PASSWORD function
    SQLAuthTypes                    Backend
    SQLAuthenticate                 users* groups*
    # details to connect to mysql db
    # [email protected] dbuser dbpass
    SQLConnectInfo                  [email protected] proftpduser xxxxxx
    # Mind that this need to match the name in you table
    SQLUserInfo                     ftpuser userid passwd uid gid homedir shell
    SQLGroupInfo                    ftpgroup groupname gid members
    # proftpd will dynamicaly create if the homedir does not yet exist
    SQLHomedirOnDemand              on
    # update counter when a user logs in
    SQLLog                          PASS updatecount
    SQLLog                          STOR,DELE modified

    I tried reinstall proftpd-mysql but it didn't help. I also tried remove ftpuser and add again but no luck...

    Any ideas of what is wrong ??
  2. marchost

    marchost New Member HowtoForge Supporter

    If you think its related to the updates, check what have been updated. In Ubuntu the apt log file is under /var/log/apt/ (should be similar under debian)

    Whats in /etc/proftpd/modules.conf
  3. slapaf

    slapaf New Member

    This is modules.conf:

    # This file is used to manage DSO modules and features.
    # This is the directory where DSO modules reside
    ModulePath /usr/lib/proftpd
    # 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
    LoadModule mod_sql_mysql.c
    #LoadModule mod_sql_postgres.c
    #LoadModule mod_quotatab.c
    #LoadModule mod_quotatab_file.c
    #LoadModule mod_quotatab_ldap.c
    #LoadModule mod_quotatab_sql.c
    #LoadModule mod_radius.c
    #LoadModule mod_wrap.c
    LoadModule mod_rewrite.c
    # keep this module the last one
    LoadModule mod_ifsession.c
    Looks like alot was updated: apache,logcheck,clamav,mailx,libpq-dev etc.

    It seems that login might be succesfull
    USER shop: Login successful.
    but its hanging on "preparing to chroot..."

    I tried to giv 0777 permissions on directory but it didn't help.

    What could keep it from chrooting ?
  4. marchost

    marchost New Member HowtoForge Supporter

    What happend when you comment this line in proftpd.conf :

    DefaultRoot ~

    If you still cant login, what does the log file says?

    I dont know if its related but I dont see this line in /etc/proftpd/mysql.conf :

    SQLMinID 500
  5. slapaf

    slapaf New Member

    Tried to comment DefaultRoot and add SQLMinID=500, same result.

    I then tried a fresh install of proftpd-mysql and it still doesn't work :confused:
  6. falko

    falko Super Moderator ISPConfig Developer

    Did you try both active and passive mode?
  7. slapaf

    slapaf New Member


    I just finished yet another reinstall after complete purge of proftpd, users, dirs...and now it works again.

    I still get
    but it seems it doesn't affect login. I just wrongly assumed that it was the reason.

    It still worries me why it was refusing to chroot and why I didn't get any errors in log.

    Thanks for trying to help though! :)

Share This Page