February 2, 2011

HOW TO RETRIEVE FTP USERNAME AND PASSWORD IN PLAINTEXT FROM PSA DB

Filed under: Miscellaneous — admin @ 4:45 am

We can easily retrieve all the FTP usernames and password under a domain in plain text, by following the below steps.

1. Enter the MySQL Prompt.

# mysql -u admin -p`cat /etc/psa/.psa.shadow`

2. use psa;

3. mysql> select US.* FROM sys_users US, hosting HS, domains DM

-> WHERE US.id = HS.sys_user_id AND HS.dom_id = DM.id AND DM.name =’domain.com’;

The below given is a sample output of that command.

+—–+———-+———-+———————————–+————+——-+

| id | login | passwd | home | shell | quota |

+—–+———-+———-+———————————–+————+——-+

| 110 | ftpuser | password | /home/httpd/vhosts/domain.com | /bin/false | 0 |

+—–+———-+———-+———————————–+————+——-+

AddThis Social Bookmark Button

File rename command

Filed under: Miscellaneous — admin @ 4:43 am

Its a perl-based command. It can we used to rename a file or multiple ones.
General Syntax ::
——-
rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]
-v :: means "verbose" 
-n  :: testing mode will show the output of command without modifying the file names.
perlexpr :: part of the command is a perl expression
Example ::
rename -n ’s/\.htm$/\.html/’ *.htm

(more…)

AddThis Social Bookmark Button
« Previous Page

Powered by WordPress