Shell Commands to Protect Directories / Use Cpanel


I'm trying to get familiar with VPS and right now I'm working on trying to setup passwords for some critical directories

in order to do that I'm trying to understand about the function htpasswd which seems to be a basic but I keep on getting

root@server [~]# htpasswd --help

-bash: htpasswd: command not found


root@server [~]# apropos htpasswd

htpasswd: nothing appropriate

which is strange because I can see the file where says it's supposed to be (/usr/local/apache/bin/htpasswd)

Is there something I should know about that which is specific to your configuration, before I do something stupid



Robert S.

Posted On: 09 Jun 2008 05:30 AM


you should use password protect directory function from cPanel of the account for which you want to set these, and than cPanel will automatically add all users with their passwords that you create there to .htpasswds file under that account.

You can't use that from shell to password protect directories.

Please let us know if you need any further assistance.

Robert S.

HostForWeb Support

This website uses Cookies