LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-16-2007, 10:58 AM   #1
Roosta21
Member
 
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55

Rep: Reputation: 15
Change ftp password in command


Hi I've lost the password for one of my ftp accounts. how can I change it using command line. I have root access; software fedora core4, i'm using proftp if thats any help

R
 
Old 02-16-2007, 12:20 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,977
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Find out what the login is for your FTP the way I do it is to redirect the passwd file like so:

cat /etc/passwd > passwdfile.txt

Then do a:

vi passwdfile.txt

In vi (command mode) search through the file for the sting ftp like so:

/ftp (the forward slash looks "forward" through the VI file to seach "backwards" type: ?ftp)

When you find the login remember it (or write it down) then as root run this command:

passwd login

Where login is the login you found in the passwd file...Hope this helps!

-custangro

Last edited by custangro; 02-16-2007 at 12:22 PM.
 
Old 02-16-2007, 12:47 PM   #3
Roosta21
Member
 
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55

Original Poster
Rep: Reputation: 15
thank you

Brilliant thank you!
 
Old 02-17-2007, 08:44 PM   #4
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,977
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
You're Welcome!

You could've also done a:

cat /etc/passwd | gerp ftp

but I like redirecting the file because I can always refer back to it if I need it
 
Old 03-14-2007, 10:11 PM   #5
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 12.04 64-bit
Posts: 230

Rep: Reputation: 30
Thanks. passwd login did work but cat /etc/passwd | grep ftp returned
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
even though there are some 5 FTP users and all work. Is there another location that stores FTP details ?
Btw, the FTP users are SSH users too and are listed in the passwd file.
 
Old 03-15-2007, 02:38 AM   #6
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Code:
Btw, the FTP users are SSH users too and are listed in the passwd file.
Security-wise, this is not so good.

Anyway, if you have the name of your ftp/ssh user for which you have forgotten the password, just do (as root)
Code:
passwd theUser #replace theUser with the actual username, as listed in /etc/passwd
So don't change the password of the user "ftp", which seems to be a generic user for your ftp service.
 
Old 12-13-2008, 04:22 AM   #7
DiGiGoth
LQ Newbie
 
Registered: Sep 2006
Posts: 17

Rep: Reputation: 0
Change ftp password in command

but how do i change my ftp password while connected from command line ?
 
  


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
Change password with the command smbpasswd ricardogorayeb Linux - General 0 10-05-2006 07:38 AM
How change samba password from command line? boardtc Mandriva 2 04-06-2006 10:45 AM
what is the command to make a user change their password after creating a new user? naweenio Linux - Newbie 7 01-05-2005 07:07 AM
How can I change e-mail password(or linux account password) with php in website?? yusuf Programming 1 05-28-2004 09:39 AM
What ftp command will change you to $HOME or ~ perothman Linux - Newbie 4 04-16-2004 05:03 PM


All times are GMT -5. The time now is 04:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration