Sanjoy Roy

[MCM, MCP, SCJP] – Senior Programmer, Sites n Stores Pty Ltd.

Tag Archives: shell script

How to create a Password Protected Directory using linux command prompt?

Create a .htaccess file in the folder you want to set. like: #root@adu [/home/hostsite/public_html/admin]# vi .htaccess copy and paste the following lines: ———————————————————- AuthName “Secure Area” AuthType Basic AuthUserFile /home/hostsite/public_html/admin/.htpasswd require valid-user ———————————————————- Now set a password: #htpasswd -c .htpasswd admin New password: admin321 confirm password: admin321 You are done. test it: www.hostsite.com.au/admin and enter [...]

Change password shell script

#!/usr/local/bin/expect -f # Password change shell script, tested on Linux and FreeBSD # ———————————- # It need expect tool. If you are using Linux use following command # to install expect # apt-get install expect # FreeBSD user can use ports or following command: # pkg_add -r -v expect # ———————————- # If you are [...]

Follow

Get every new post delivered to your Inbox.