LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Change ftp password in command (https://www.linuxquestions.org/questions/linux-newbie-8/change-ftp-password-in-command-529647/)

Roosta21 02-16-2007 10:58 AM

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

custangro 02-16-2007 12:20 PM

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

Roosta21 02-16-2007 12:47 PM

thank you
 
Brilliant thank you!

custangro 02-17-2007 08:44 PM

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

anjanesh 03-14-2007 10:11 PM

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.

timmeke 03-15-2007 02:38 AM

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.

DiGiGoth 12-13-2008 04:22 AM

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


All times are GMT -5. The time now is 07:34 PM.