LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 09-23-2009, 04:50 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 119

Rep: Reputation: 15
vsftpd: cannot locate user specified in 'ftp_username':ftp


Hello,

I'm trying to run vsftpd 2.2.0 under vanilla linux 2.6.29.
All the file system was built from scratch. I'm using busybox.

I ran vsftpd with: /sbin/vsftpd /etc/vsftpd.conf
Attached the vsftpd.conf I used.

When I tried to login from another PC I got the message:

P:\>ftp 128.127.y.x
Connected to 128.127.x.y.
500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp
Connection closed by remote host.

Before running I added the user ftp to /etc/passwd. I checked it by "su - ftp". It works.

Thanks,
Zvika.
 
Old 09-23-2009, 05:19 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Quote:
Before running I added the user ftp to /etc/passwd. I checked it by "su - ftp". It works.
How did you add the user in /etc/passwd? If you edit the file and add the user by hand, you should do the same for /etc/shadow.
Also "su - ftp" shouldn't work, because you don't have to give that user a valid shell.
 
Old 09-23-2009, 09:21 PM   #3
zvivered
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 15
I created the ftp user with "adduser"

Quote:
Originally Posted by bathory View Post
How did you add the user in /etc/passwd? If you edit the file and add the user by hand, you should do the same for /etc/shadow.
Also "su - ftp" shouldn't work, because you don't have to give that user a valid shell.
The user ftp was created by: adduser -h /var/ftp ftp
But after doing so, no line was added to /etc/shadow.

On my CentOS PC the line in /etc/passwd is:
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
and in /etc/shadow is:
ftp:*:14471:0:99999:7:::

Should I use those lines exactly in my embedded linux ?

Thanks.
 
Old 09-24-2009, 01:05 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Add the missing line in /etc/shadow and see if it helps.
 
Old 09-24-2009, 11:17 PM   #5
zvivered
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 15
Adding the line to /etc/shadow did not help

Quote:
Originally Posted by bathory View Post
Add the missing line in /etc/shadow and see if it helps.
vsftpd is calling to getpwnam ("ftp"). The pointer returned in NULL.
What can cause this problem ?

Thanks.
 
Old 09-25-2009, 01:26 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
I don't know what the problem is, but from the function name, I guess it complains because it cannot find a password for the user ftp.
Anyway doing a little search I came accross thisregarding the 1st problem.
Quote:
Problem: When trying to ftp into the slug, it gives a message 500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp""

Solution: Change the echo line in /unslung/rc.xinetd to: echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf
Hope that helps.

Regards
 
Old 10-09-2009, 10:19 PM   #7
zvivered
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 15
Solution - bad toolchain

It seems the cause to the problem was the toolchain I used. The original toolchain I used was created with Dan Kegel's crosstool 0.43. It was based on old kernel header files (2.6.12).

When I created the toolchain with crosstool-ng, it worked fine.

Thanks.
 
  


Reply


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
Does vsftpd have to have the user ftp thllgo Linux - Server 3 02-03-2009 06:00 PM
How to create a ftp user on VSFTPD in linux rahiljavaid Linux - Newbie 2 11-08-2006 12:42 PM
vsftpd : cannot locate user acampbell Linux - Networking 2 10-16-2006 08:33 AM
vsftpd - only one user can login to ftp greengrocer Linux - Newbie 4 12-08-2005 06:41 AM
vsftpd to authenticate ftp user thethakuri Linux - Networking 4 01-31-2003 04:49 AM


All times are GMT -5. The time now is 09:35 PM.

Main Menu
Advertisement
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