[smokeping-users] how to enforce username/password logons to access smokeping

Darren Murphy darren at victoriajd.com
Thu Mar 22 06:34:34 CET 2012

Just as an aside to this - if you _are_ using HTTP authentication,
there is a trivial modification you can make to Smokeping.pm, that
will make the logged-in user name available for use in the HTML

See https://github.com/mcdarren/SmokePing/commit/50333cf052a6fc2ed29f16639ac1d0c891978b38

With that change in place, you can then use something like the
following in basepage.html

<h3>Logged in as <##authuser##></h3>


PS. Tobi - is this worth a pull request?

On 22 March 2012 03:26, Murray Davis <murray.g.davis at gmail.com> wrote:
> Thank you to Peter and Dan for their replies. After reading Peter's
> response, I started looking at Apache's documentation and got things
> working. As I was about to respond to the list server, I noticed Dan's
> response which basically confirmed my approach. Here goes:
> Step 1: Created an apache username:
> htpasswd -c /etc/apache2/passwords smokeping
> Step 2: Modified the smokeping config file.../etc/apache2/conf.d/smokeping
> ScriptAlias /smokeping/smokeping.cgi
> /usr/share/smokeping/cgi-bin/smokeping.cgi
> Alias /smokeping /usr/share/smokeping/www
> <Directory "/usr/share/smokeping/www">
>     Options FollowSymLinks
>     AllowOverride AuthConfig
>     AuthType Basic
>     AuthName "Restricted Files"
>     AuthUserFile /etc/apache2/passwords
>     Require user cacti
> </Directory>
> I changed AuthName from "Require Password" to "Restricted Files".
> Step 3 Placed an .htaccess file in the root of smokeping's home directory. I
> started with placing it in /usr/share/smokeping/www and cgi-bin, but ended
> up placing it at the parent level.
> AuthType Basic
> AuthName "Restricted Files"
> AuthUserFile /etc/apache2/passwords
> Require user smokeping
> I restarted Apache and smokeping and I am now prompted for a
> username/password. Only the smokeping user gets in. If I click on the
> "Cancel" button on the logon window, I am then met with an Failed
> Authorization window whereas when AuthName was "Require Password", I would
> be taken to the smokeping webpage.
> Thanks for the help...
> mgd
> _______________________________________________
> smokeping-users mailing list
> smokeping-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

More information about the smokeping-users mailing list