user can not login o pure ftpd

Asked by vincent90152900

I use Ubuntu 9.10 Desktop.
I follow this thread below to install and setup PureFTP
https://help.ubuntu.com/community/PureFTP

I can not login the server from another computer.

Following are the messages from server

Jan 29 11:47:13 file-desktop pure-ftpd: (?@vincent-laptop.local) [INFO] New connection from vincent-laptop.local
Jan 29 11:47:22 file-desktop pure-ftpd: (?@vincent-laptop.local) [INFO] PAM_RHOST enabled. Getting the peer address
Jan 29 11:47:25 file-desktop pure-ftpd: (?@vincent-laptop.local) [WARNING] Can't login as [joe]: account disabled

Please help me to solve this.

Many thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu pure-ftpd Edit question
Assignee:
No assignee Edit question
Solved by:
Andy Hodges
Solved:
Last query:
Last reply:
Revision history for this message
Andy Hodges (ahodges) said :
#1

Hi Vincent,

You should be able to get this back up and running if you change the user id and group id associated with that ftpuser account that was created in the link you gave up top.

If you type "id ftpuser" from the Linux shell, you'll probably get a UID number that is less then 1000, or a GID number that is less then 1000....perhaps both below 1000.

You can change that number via the "User and Group" menu item underneath the System > Administration menu, or via the shell:

"sudo usermod -u 1001 -p -U ftpuser"
"sudo groupmod -g 1002 ftpgroup"

This is the section of code that causes the error on my end:
--------------------------
 if (authresult.uid < useruid) {
        logfile(LOG_WARNING, MSG_ACCOUNT_DISABLED, account);
        randomsleep(tapping);
        if (tapping >= MAX_PASSWD_TRIES) {
            addreply_noformat(530, MSG_AUTH_FAILED);
            doreply();
            _EXIT(EXIT_FAILURE);
        }
        addreply_noformat(530, MSG_NOTRUST);
        doreply();
        return;

---------------------

Revision history for this message
vincent90152900 (vincent90152900) said :
#2

Hi Andy,

I can see the ftpuser when I execute the command, "id ftpuser".

However, I can not see it in the System > Administration menu.

If i try to add a ftpuser via the System > Administration menu, I will get a error message, "the user already exist".

I had change my ftpuser id, but still does not work.

Please help.

Revision history for this message
Andy Hodges (ahodges) said :
#3

OK, that part is ok then, so long as both the group and user ID's are above 1000. Now we move over to pure-ftpd itself. Delete the Joe user that they had you add in the instructions, and re-add it:

sudo pure-pw userdel joe
pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe
sudo pure-pw mkdb

Did that get you back up and running?

Revision history for this message
vincent90152900 (vincent90152900) said :
#4

Hi Andy,

Many thanks for your helping.

After I change user id and group id, I will encounter a message every time when I want to use pureadmin to manage my virtual user accounts.

The message tells me that pureadmin will modify user id and group id, and I have to accept that or I can not use the pureadmin to manage my virtual user accounts.

So I try to set up the virtual use to use my system account as fake root, and it works.

I think Pure-FTPD is compatible with Ubuntu 9.10.

Please tell me, how to I debug on Ubuntu?

Maybe I can find out which section of code that causes the error.

Many thanks.

Regards,
Vincent

Revision history for this message
Best Andy Hodges (ahodges) said :
#5

Sorry Vincent, I've never actually used pureadmin. I can see the problem you are running into though,

It looks like a bit of a conflict and I expect one of the reasons pureadmin is still listed as being in beta. There is code in place in pureadmin to look for the existing user and group id's and use those if available, but apparently that isn't working properly.

You can get both to play nice if you edit the /etc/pure-ftpd/conf/MinUID file and change the number to 100, then delete both the ftpuser userid and ftpgroup groupid:

sudo userdel ftpuser
sudo groupdel ftpgroup

Keep in mind: Ubuntu reserves the first 1000 UserID #'s for system use. Your mileage going forward may vary.

Revision history for this message
vincent90152900 (vincent90152900) said :
#6

Thanks Andy Hodges, that solved my question.

Revision history for this message
vincent90152900 (vincent90152900) said :
#7

Hi Andy,

Many thanks for the information.