Create an FTP user on a cPanel server using ssh [shell]

Sometimes, it becomes essential that you need to add additional ftp user in cPanel but you can not access cPanel may be because cPanel is not working or license has expired. The only option leaves for you to create account from the shell using ssh.

Here are some commands that you can use to create account from shell.

You need to login into server using root and execute following command.

/usr/local/cpanel/bin/proftpd_passwd -a :::::/home//public_html/ftp:/sbin/nologin

where:

= your cPanel username
= group_id of cPanel user; you can obtain from /etc/passwd
= user_id of cPanel user; you can obtain from /etc/passwd
= the user to be used for login for example if ftpuser = ftp then to login use ftp@domain.com

After you execute this command, you will get result something like below.

FTPUSER=ftp
FTPPASS=EsrYqZIf5fEb.
UUID =500
UGID =500
OWNER =ftp
HOMEDIR=/home/ftp/public_html/billing
SHELL =/sbin/nologin

After that run

/usr/local/cpanel/bin/ftpupdate

You are done!!

Leave a Reply

Your email address will not be published. Required fields are marked *