Trouble setting up basic user authentication on apache2 web server


 
Thread Tools Search this Thread
Operating Systems Linux Trouble setting up basic user authentication on apache2 web server
# 29  
Old 02-02-2015
Quote:
Originally Posted by Corona688
Dot, then slash, which means 'current directory'. So you are running htpasswd.pl from the current directory.

The 'options and stuff' are the usual options you would expect htpasswd to use.
Alright

So using this guide Authentication and Authorization - Apache HTTP Server Version 2.2, instead of running
Code:
 htpasswd -c /usr/local/apache/passwd/passwords rbowen

Would I be running :
Code:
 htpasswd.pl -c /opt/apache2/passwd/passwords rbowen

I really appreciate your help Corona, sorry for asking tons of questions.
# 30  
Old 02-02-2015
No, you would be running:

Code:
./htpasswd.pl -c /usr/local/apache/passwd/passwords rbowen

# 31  
Old 02-02-2015
Quote:
Originally Posted by Corona688
No, you would be running:

Code:
./htpasswd.pl -c /usr/local/apache/passwd/passwords rbowen

Code:
./htpasswd.pl -c /usr/local/apache/passwd/passwords rbowen


./htpasswd.pl: line 1: sswd.pl: command not found
./htpasswd.pl: line 17: use: command not found
./htpasswd.pl: line 18: use: command not found
./htpasswd.pl: line 20: use: command not found
./htpasswd.pl: line 21: use: command not found
./htpasswd.pl: line 23: ::Std::STANDARD_HELP_VERSION: command not found
./htpasswd.pl: line 24: my: command not found
./htpasswd.pl: line 25: syntax error near unexpected token `('
./htpasswd.pl: line 25: `my %opt = ('


Im starting to think this will never work Smilie
# 32  
Old 02-02-2015
What do you have as the very first line of the script?

It needs to be #!/usr/bin/env perl otherwise it will not be run with PERL
This User Gave Thanks to Corona688 For This Post:
# 33  
Old 02-02-2015
Quote:
Originally Posted by Corona688
What do you have as the very first line of the script?

It needs to be #!/usr/bin/env perl otherwise it will not be run with PERL
argghhhhhhhh !!! I edited the first line to include what you have and ran

Code:
/htpasswd.pl -c /usr/local/apache/passwd/passwords rbowen

And i get these messages:

Can't locate Authen/Htpasswd.pm in @INC (@INC contains: /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at ./htpasswd.pl line 22.
BEGIN failed--compilation aborted at ./htpasswd.pl line 22.

Last edited by LinuxIntern445; 02-02-2015 at 04:29 PM..
# 34  
Old 02-02-2015
It's not "What I have" by the way, it's exactly like it was in the link.

You need to install perl-Apache-Htpasswd.
# 35  
Old 02-02-2015
Quote:
Originally Posted by Corona688
It's not "What I have" by the way, it's exactly like it was in the link.

You need to install perl-Apache-Htpasswd.
Code:
 zypper install perl-apache2-htpasswd



Refreshing service 'spacewalk'.
Loading repository data...
Reading installed packages...
Package 'perl-apache2-htpasswd' not found.
Resolving package dependencies...

Nothing to do.


P.S I tried just apache, and tried capitilizing, still the same result.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

User authentication failed while log in Solaris 8 client on Linux NIS server.

Based on the NIS migration tests I did and another question I posted earlier on. https://www.unix.com/solaris/272021-solaris-8-md5-encryption-support.html I tried to downgrade NIS linux encryption to DES to support solaris connection. So I modified /etc/pam.d/system-auth as below, password... (0 Replies)
Discussion started by: bestard
0 Replies

2. What is on Your Mind?

Visualizing MySQL Session : Web Server User Behavior at UNIX.com

Visualizing MySQL Session - Web Server User Behavior The video in this post shows unix.com forum user session information in a way that has never been visualized before. I plan to enrich this visualization significantly in the future - it's currently just a first beta. RWBeylgjOqs (0 Replies)
Discussion started by: Neo
0 Replies

3. Shell Programming and Scripting

Trouble with setting a variable with vastool

Hi I have this command that when put on the command line it returns the output the way I want it. /opt/quest/bin/vastool list -a groups | grep testdev_li | grep dev | awk -F"" 'NF>2{print $2}' | cut -c2- | tr '\n' '|' The output of this is ... (2 Replies)
Discussion started by: ajetangay
2 Replies

4. UNIX for Dummies Questions & Answers

Trouble setting up a shared folder

I'm trying to set up a folder in my home directory that will be shared with another user but for some reason it is not working this is what I've done, I have tried two different ways using ACL's and chown/chgrp etc I set up a group called say: sharedgroup and added both my user (john) and fred... (3 Replies)
Discussion started by: 14952john
3 Replies

5. Ubuntu

Trouble setting up Java classpath

Saw an error while setting up an application called i2phex: # ./run.sh java.lang.RuntimeException: Failed to initialize phex.net.repres.i2p.I2PPresentationManager at phex.common.ManagerController.initializeManagers(ManagerController.java:78) at phex.Main.main(Main.java:161)After... (0 Replies)
Discussion started by: Israel213
0 Replies

6. Shell Programming and Scripting

Having trouble writing a basic shell program

Hello. I'm trying to write a shell script that will take files that have .tar, .tar.gz, .tar.Z, .gz, .Z and .zip file extensions and uncompress and unarchive them. The script should be able to take multiple arguments. So far I can write a script using the case command that will do this but it will... (3 Replies)
Discussion started by: SeanWuzHere
3 Replies

7. UNIX for Dummies Questions & Answers

Need dummies guide to setting up Web server...

Hiya All, Hope you can help! I need a Dummies guide to setting up a Web server. I hope you have some good URLs or advice etc. I now finally have: 1. "Web Server" - Fedora Core3 onto my Spare PC. 2. Windows XP laptop 3. Basic Web site set up via Front Page - to upload onto Web... (5 Replies)
Discussion started by: marty 600
5 Replies

8. UNIX for Dummies Questions & Answers

setting up web server on Red hat 7.2

hi I was successful in installing redhat 7.2 with no problems or error =) (first try) and It took me about 40 minutes to install it on a p233 mmx. It's running Gnome. I have some issues which I'm unsure of how to deal with. 1.How do I install an apache server, or is there one simular that... (11 Replies)
Discussion started by: Special K
11 Replies

9. UNIX for Dummies Questions & Answers

setting up web server

Is there any good resources for setting up a unix web server, I mean starting with the basics for a extremely new newbie. Thanks Scott (1 Reply)
Discussion started by: supastar
1 Replies
Login or Register to Ask a Question