Shell Commands to Protect Directories / Use Cpanel
- Category: SERVER AND DNS
- Published: Saturday, 20 June 2009 15:34
- Written by Super User
- Hits: 4330
hi,
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
or
root@server [~]# apropos htpasswd
htpasswd: nothing appropriate
which is strange because I can see the file where apache.org 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
Kindly
Matthieu
Robert S.
Posted On: 09 Jun 2008 05:30 AM
Hi,
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