LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-01-2008, 12:29 PM   #1
Seregwethrin
Member
 
Registered: Feb 2008
Posts: 112

Rep: Reputation: 16
Question [Solved] Proftp - logging in with a user except root. How to?


Hello;

I've a /www directory and 4-5 sites at there. /www/xxx.com /www/xxx.net etc...

I did a "chown -R /www ftp:web"

I've set user "ftp"'s home directory as /www
I've set a password for user "ftp"

I can login with root user. But i can't login any other users.

What can i do for logging in with ftp user?

I've searched but i can't find any useful information.

I'm using proftpd.

Last edited by Seregwethrin; 03-09-2008 at 05:19 AM. Reason: Solved.
 
Old 03-02-2008, 07:35 AM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Check that the ftp user is not disabled in the first place. Some distributions include the ftp user but leave it disabled, so that you need to manually enable anonymous FTP (with the assumption being that anon FTP is not what most people will want by default).

Check the file /etc/ftpusers and see what names are listed. Those are the names of the users who cannot use FTP. It would be a good idea to put root into this list, by the way, as logging in as root remotely is a bad idea with any protocol.

Failing that, check the proftpd logs when you try and log in with a non-root user. It should give you an error message in the logs which you can use to start troubleshooting.
 
Old 03-03-2008, 06:30 AM   #3
Seregwethrin
Member
 
Registered: Feb 2008
Posts: 112

Original Poster
Rep: Reputation: 16
No, ftp user is not disabled. It is not at the ftpusers file.

I know logging with root is a bad idea but i can't login any other user.

Anon ftp is disabled at my proftpd conf. I know that anon ftp is different than what i want. Do i know wrong? Do i have to enable anon ftp?
 
Old 03-03-2008, 11:00 AM   #4
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Anonymous FTP is generally linked to the "ftp" user, so disabling it in your ProFTPd configuration would stop that user from logging in.
 
Old 03-06-2008, 06:40 AM   #5
Seregwethrin
Member
 
Registered: Feb 2008
Posts: 112

Original Poster
Rep: Reputation: 16
This post's problem is solved.

Last edited by Seregwethrin; 03-06-2008 at 08:06 AM.
 
Old 03-06-2008, 08:04 AM   #6
Seregwethrin
Member
 
Registered: Feb 2008
Posts: 112

Original Poster
Rep: Reputation: 16
Okay i set the config file for logs. It gives general "wrong password" error.

Code:
server.xxx.com [11556] ::ffff:(MY IP) [06/Mar/2008:15:33:08 +0200] "USER ftpuser" 331
server.xxx.com [11556] ::ffff:(MY IP) [06/Mar/2008:15:33:11 +0200] "PASS (hidden)" 530
And i found something strange. All users can't login, except root. Root user can login if the pam config set and if the mod_auth_pam set as first auth order. If not, root user can't login too.

Code:
# Use pam to authenticate (default) and be authoritative
AuthPAMConfig                   proftpd
AuthOrder                       mod_auth_pam.c* mod_auth_unix.c
If mod_auth_linux first, root user can't login. If mod_auth_pam removed, root user can't login. But logging anonymously with any user is working great (home dirs vs..)

/etc/pam.d/proftpd
Code:
#%PAM-1.0
auth       required     pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth       required     pam_stack.so service=system-auth
auth       required     pam_shells.so
account    required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
Also there's no user at /etc/ftpusers, which i want to use at ftp.

What can i do? Do you have an idea? I don't know much about PAM.

Last edited by Seregwethrin; 03-06-2008 at 08:09 AM.
 
Old 03-09-2008, 05:01 AM   #7
Seregwethrin
Member
 
Registered: Feb 2008
Posts: 112

Original Poster
Rep: Reputation: 16
also i looked at /etc/shadow
root user's password looks encrypted but ftpuser's password not encrypted.

Can anyone help me please?

Edit: okay i tried to overwrite the root's encrypted password to ftpuser's password at /etc/shadow and i can login with ftpuser now with root's password.

How can i encrypt user passwords at /etc/shadow? That is the problem for me now.

Last edited by Seregwethrin; 03-09-2008 at 05:04 AM.
 
Old 03-09-2008, 05:17 AM   #8
Seregwethrin
Member
 
Registered: Feb 2008
Posts: 112

Original Poster
Rep: Reputation: 16
Okay okay i solved the problem.

I was updating password like usermod -p passwod ftpuser

Now i updated passwords with passwod command. And it works great

Thanks for reading all. The happy end
 
  


Reply

Tags
proftpd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent root user from logging into ssh linuxjamil Linux - Server 2 10-08-2007 06:10 PM
having trouble logging in as the root user thebiggiantmouse Linux - Newbie 3 06-29-2006 09:15 AM
switching between user and root without logging out redhat_marsi Linux - Newbie 7 06-13-2005 10:38 AM
Problems logging in as root user mdk 9.1 czechknight93 Mandriva 2 03-20-2004 12:53 AM
Logging On As Root User BACTRATE Mandriva 6 02-16-2004 10:48 AM


All times are GMT -5. The time now is 04:57 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration