LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-07-2003, 01:40 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Rep: Reputation: 32
Password Protecting Web Folders


Hi

I'm working off this page.

http://support.directi.com/support/s...et/faq197.html

I created my .htaccess file using Macromedia Dreamweaver MX

I've uploaded the file to the folder i want to protect.

On step 3 ( Add users with the following command.)

I had a look in my OS to see if i had apache, and i dont think its there

I use the command find / -name apache

and nothings came up.

I'm alittle lost now, so what next ?

Is it ok to follow that page..?

I know my apache web server is running

[root@www root]# /etc/rc.d/init.d/httpd status
httpd (pid 4264 4159 3472 3471 3470 3469 3466 3465 3464 3463 3432) is running...



any one give me some idea on whats going please.


TT

Last edited by tommytomato; 12-07-2003 at 01:44 AM.
 
Old 12-07-2003, 06:27 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Step 3 is correct.

htpasswd is what you are looking for and it should reside in the apache tree (the bin dir). If apache is on your box (which it is looking at your 'status' output) it should be there.

apachectl is in the same directory as htpasswd. You might want to check apache's init script to locate the place it is stored.

Default install dir is normally /usr/local/apache. But I've noticed that not all distro's place apache in that dir.

PS: If this is the first time you use htpasswd, you might need to use the -c option for the first user you enter:

htpasswd -c /path/to/htpasswd.users <user>
all other users don't need the -c part.
 
Old 12-07-2003, 08:10 AM   #3
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
I've looked all over the place for it...


this is my CLI

Code:
[root@www root]# cd .usr/
-bash: cd: .usr/: No such file or directory
[root@www root]# cd /usr/
[root@www usr]# ls
bin   etc    include   lib      local  share  tmp
dict  games  kerberos  libexec  sbin   src    X11R6
[root@www usr]# cd local/
[root@www local]# ls
bin  etc  games  include  lib  libexec  sbin  share  src
[root@www local]# find / -name apache
[root@www local]# cd
[root@www root]# cd /bin/
[root@www bin]# ls
arch        date           gettext   mkdir          rm         touch
ash         dd             grep      mknod          rmdir      tracepath
ash.static  df             gtar      mktemp         rpm        tracepath6
awk         dmesg          gunzip    more           rvi        traceroute
basename    dnsdomainname  gzip      mount          rview      traceroute6
bash        doexec         hostname  mt             sed        true
bash2       domainname     igawk     mv             setfont    umount
bsh         dumpkeys       ipcalc    netstat        setserial  uname
cat         echo           kbd_mode  nice           sh         unicode_start
chgrp       ed             kill      nisdomainname  sleep      unicode_stop
chmod       egrep          link      pgawk          sort       unlink
chown       env            ln        ping           stty       usleep
cp          ex             loadkeys  ping6          su         vi
cpio        false          login     ps             sync       view
csh         fgrep          ls        pwd            tar        ypdomainname
cut         gawk           mail      red            tcsh       zcat
[root@www bin]# locate apache
/var/www/manual/images/apache_header.gif
/var/www/manual/mod/mod_python/inst-apacheconfig.html
/var/www/manual/mod/mod_python/module-apache.html
/var/www/manual/programs/apachectl.html.en
/var/www/manual/programs/apachectl.html
/var/www/html/ebooks/apache_configuration
/var/www/html/ebooks/apache_configuration/images
/var/www/html/ebooks/apache_configuration/images/apache_config_main_edit.jpg
/var/www/html/ebooks/apache_configuration/images/apache_configuration_bar.jpg
/var/www/html/ebooks/apache_configuration/images/apache_configuration_main.jpg
/var/www/html/ebooks/apache_configuration/images/apache_configuration_main_a.jpg
/var/www/html/ebooks/apache_configuration/images/apache_configuration_server.jpg
/var/www/html/ebooks/apache_configuration/images/apache_terminal_bar.jpg
/var/www/html/ebooks/apache_configuration/images/ev_add.jpg
/var/www/html/ebooks/apache_configuration/images/ev_pass.jpg
/var/www/html/ebooks/apache_configuration/images/ev_set.jpg
/var/www/html/ebooks/apache_configuration/images/help.jpg
/var/www/html/ebooks/apache_configuration/images/netway.jpg
/var/www/html/ebooks/apache_configuration/images/performance_tuning.jpg
/var/www/html/ebooks/apache_configuration/images/rgw_logo.jpg
/var/www/html/ebooks/apache_configuration/images/site_config_add.jpg
/var/www/html/ebooks/apache_configuration/images/site_config_edit.jpg
/var/www/html/ebooks/apache_configuration/images/site_config_error.jpg
/var/www/html/ebooks/apache_configuration/images/ssl_config.jpg
/var/www/html/ebooks/apache_configuration/images/vh_dir_add.jpg
/var/www/html/ebooks/apache_configuration/images/vh_dir_edit.jpg
/var/www/html/ebooks/apache_configuration/images/virtual_host.jpg
/var/www/html/ebooks/apache_configuration/images/virtual_host_directories_co.jpg
/var/www/html/ebooks/apache_configuration/images/virtual_host_Env_config.jpg
/var/www/html/ebooks/apache_configuration/images/virtual_host_logging_config.jpg
/var/www/html/ebooks/apache_configuration/images/virtual_host_properties.jpg
/var/www/html/ebooks/apache_configuration/images/virtual_host_site_config.jpg
/var/www/html/ebooks/apache_configuration/apache_configuration.php
/var/www/html/ebooks/apache_configuration/apache_configuration_add_new_address.php
/var/www/html/ebooks/apache_configuration/apache_configuration_edit_an_address.php
/var/www/html/ebooks/apache_configuration/apache_configuration_tut.php
/var/www/html/ebooks/apache_configuration/Env_add.php
/var/www/html/ebooks/apache_configuration/Env_pass.php
/var/www/html/ebooks/apache_configuration/Env_set.php
/var/www/html/ebooks/apache_configuration/performance_tuning.php
/var/www/html/ebooks/apache_configuration/server.php
/var/www/html/ebooks/apache_configuration/site_configuration_add.php
/var/www/html/ebooks/apache_configuration/site_configuration_edit.php
/var/www/html/ebooks/apache_configuration/site_configuration_error_pages.php
/var/www/html/ebooks/apache_configuration/vh_dir_add.php
/var/www/html/ebooks/apache_configuration/vh_dir_edit.php
/var/www/html/ebooks/apache_configuration/virtual_host.php
/var/www/html/ebooks/apache_configuration/virtual_host_Dir_config.php
/var/www/html/ebooks/apache_configuration/virtual_host_Env_config.php
/var/www/html/ebooks/apache_configuration/virtual_host_general_options.php
/var/www/html/ebooks/apache_configuration/virtual_host_logging_config.php
/var/www/html/ebooks/apache_configuration/virtual_host_pannel.php
/var/www/html/ebooks/apache_configuration/virtual_host_site_config.php
/var/www/html/ebooks/apache_configuration/virtual_host_ssl_config.php
/var/www/icons/apache_pb2_ani.gif
/var/www/icons/apache_pb.gif
/var/www/icons/apache_pb.png
/var/www/icons/apache_pb2.gif
/var/www/icons/apache_pb2.png
/usr/share/doc/mod_perl-1.99_09/docs/devel/core/apache_integration.pod
/usr/share/doc/squirrelmail-1.4.0/README.russian_apache
/usr/share/man/man8/apachectl.8.gz
/usr/share/vim/vim62/syntax/apachestyle.vim
/usr/share/vim/vim62/syntax/apache.vim
/usr/share/icons/Bluecurve/16x16/apps/apacheconf.png
/usr/share/icons/Bluecurve/24x24/apps/apacheconf.png
/usr/share/icons/Bluecurve/36x36/apps/apacheconf.png
/usr/share/icons/Bluecurve/48x48/apps/apacheconf.png
/usr/sbin/apachectl
/usr/lib/python2.2/site-packages/mod_python/apache.py
/usr/lib/python2.2/site-packages/mod_python/apache.pyc
/usr/lib/python2.2/site-packages/mod_python/apache.pyo
[root@www bin]#
this one is a website /var/www/html/ebooks


besides all that i'm still lost
 
Old 12-07-2003, 08:13 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Apachectl is there:

usr/sbin/apachectl

Check /usr/sbin for htpasswd.
 
Old 12-07-2003, 08:18 AM   #5
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
yes Apachectl is there

and this is where you said it was

[root@www sbin]# find / -name htpasswd
/usr/bin/htpasswd
[root@www sbin]#


I've lost myself now !


TT
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
protecting Web Folders tommytomato Linux - Security 1 12-14-2003 09:52 AM
Password Protected web folders wolftechmn Linux - General 1 12-14-2003 12:58 AM
Password Protecting Web Folders tommytomato Linux - Security 3 12-06-2003 09:51 AM
Password Protecting Web Sites ChrisDiG Linux - Software 1 11-01-2003 08:53 AM
Password Protecting Folders with Apache wyndman Linux - Newbie 0 06-27-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration