Authentication: Groups: Difference between revisions

Jump to navigation Jump to search
m
Reverted edits by Upazixorys (Talk); changed back to last version by Ric
No edit summary
m (Reverted edits by Upazixorys (Talk); changed back to last version by Ric)
 
Line 1: Line 1:
=[http://ynejynezex.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
{{Uc nav Authentication}}
{{Uc nav Authentication}}
'''Authentication Groups'''
'''Authentication Groups'''
Line 9: Line 8:


The above is a little contrived but gives four grounps '''ceo''', '''directors''', '''managers''' and '''admins'''. For this example I will use the password list from the introduction page:  
The above is a little contrived but gives four grounps '''ceo''', '''directors''', '''managers''' and '''admins'''. For this example I will use the password list from the introduction page:  
<pre>
<pre>
root:root
root:root
John:john123
John:john123
Line 17: Line 16:
Dawn:dawn123
Dawn:dawn123
Ruth Smith:ruth123
Ruth Smith:ruth123
&lt;/pre&gt;
</pre>
Single member groups are useful because it avoids hard coding specific names in the htaccess file.   
Single member groups are useful because it avoids hard coding specific names in the htaccess file.   
{|cellspacing=&quot;4&quot; cellpadding=&quot;4&quot;
{|cellspacing="4" cellpadding="4"
|-valign=&quot;top&quot; style=&quot;background:#f5f5f5;&quot;
|-valign="top" style="background:#f5f5f5;"
|'''ceo'''||'''directors'''||'''managers'''||'''admins'''
|'''ceo'''||'''directors'''||'''managers'''||'''admins'''
|-valign=&quot;top&quot; style=&quot;background:#f5f5f5;&quot;
|-valign="top" style="background:#f5f5f5;"
|John:john123||Dave Smith:dave123||Mike:mike123||root:root
|John:john123||Dave Smith:dave123||Mike:mike123||root:root
|-valign=&quot;top&quot; style=&quot;background:#f5f5f5;&quot;
|-valign="top" style="background:#f5f5f5;"
|&amp;nbsp;||Ruth Smith:ruth123||Jane:jane123||&amp;nbsp;
|&nbsp;||Ruth Smith:ruth123||Jane:jane123||&nbsp;
|-valign=&quot;top&quot; style=&quot;background:#f5f5f5;&quot;
|-valign="top" style="background:#f5f5f5;"
|&amp;nbsp;||&amp;nbsp;||Dawn:dawn123||&amp;nbsp;
|&nbsp;||&nbsp;||Dawn:dawn123||&nbsp;
|}
|}
'''''Note 1'':''' Delete the first entry '''root:root''' (everyone knows this) I use it only for testing
'''''Note 1'':''' Delete the first entry '''root:root''' (everyone knows this) I use it only for testing
Line 41: Line 40:


Add the following groups:
Add the following groups:
&lt;pre&gt;
<pre>
ceo:John
ceo:John
directors:&quot;Dave Smith&quot; &quot;Ruth Smith&quot;
directors:"Dave Smith" "Ruth Smith"
managers:Mike Jane Dawn
managers:Mike Jane Dawn
admin:root
admin:root
&lt;/pre&gt;    
</pre>    
'''''Note 1'':''' Enclose names with spaces in quotes.
'''''Note 1'':''' Enclose names with spaces in quotes.


Line 58: Line 57:
The '''require''' line changes to Require group:
The '''require''' line changes to Require group:


'''Require group &quot;group name 1&quot; &quot;group name 2'''  
'''Require group "group name 1" "group name 2'''  


Modified .htaccess files are shown below:
Modified .htaccess files are shown below:
Line 64: Line 63:
==== John ====
==== John ====
* Edit file as shown UniServer\udrive\www\john\'''.htaccess'''  
* Edit file as shown UniServer\udrive\www\john\'''.htaccess'''  
&lt;pre&gt;
<pre>
SSLOptions +StrictRequire
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq &quot;localhost&quot;
SSLRequire %{HTTP_HOST} eq "localhost"
ErrorDocument 403 https://localhost/john/
ErrorDocument 403 https://localhost/john/


AuthName &quot;Uniform Server - Server Access&quot;
AuthName "Uniform Server - Server Access"
AuthType Basic
AuthType Basic
AuthUserFile /htpasswd/www/.htpasswd
AuthUserFile /htpasswd/www/.htpasswd
AuthGroupFile /htpasswd/www/.htgroup
AuthGroupFile /htpasswd/www/.htgroup
Require group ceo
Require group ceo
&lt;/pre&gt;
</pre>


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 81: Line 80:
==== Dave Smith ====
==== Dave Smith ====
* Edit file as shown UniServer\udrive\www\dave_smith\'''.htaccess'''  
* Edit file as shown UniServer\udrive\www\dave_smith\'''.htaccess'''  
&lt;pre&gt;
<pre>
SSLOptions +StrictRequire
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq &quot;localhost&quot;
SSLRequire %{HTTP_HOST} eq "localhost"
ErrorDocument 403 https://localhost/dave_smith/
ErrorDocument 403 https://localhost/dave_smith/


AuthName &quot;Uniform Server - Server Access&quot;
AuthName "Uniform Server - Server Access"
AuthType Basic
AuthType Basic
AuthUserFile /htpasswd/www/.htpasswd
AuthUserFile /htpasswd/www/.htpasswd
AuthGroupFile /htpasswd/www/.htgroup
AuthGroupFile /htpasswd/www/.htgroup
Require group ceo directors
Require group ceo directors
&lt;/pre&gt;
</pre>


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 98: Line 97:
==== Dawn ====
==== Dawn ====
* Edit file as shown UniServer\udrive\www\dawn\'''.htaccess'''  
* Edit file as shown UniServer\udrive\www\dawn\'''.htaccess'''  
&lt;pre&gt;
<pre>
SSLOptions +StrictRequire
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq &quot;localhost&quot;
SSLRequire %{HTTP_HOST} eq "localhost"
ErrorDocument 403 https://localhost/dawn/
ErrorDocument 403 https://localhost/dawn/


AuthName &quot;Uniform Server - Server Access&quot;
AuthName "Uniform Server - Server Access"
AuthType Basic
AuthType Basic
AuthUserFile /htpasswd/www/.htpasswd
AuthUserFile /htpasswd/www/.htpasswd
AuthGroupFile /htpasswd/www/.htgroup
AuthGroupFile /htpasswd/www/.htgroup
Require group managers
Require group managers
&lt;/pre&gt;
</pre>


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 115: Line 114:
==== Ruth Smith ====
==== Ruth Smith ====
* Edit file as shown UniServer\udrive\www\ruth_smith'''.htaccess'''
* Edit file as shown UniServer\udrive\www\ruth_smith'''.htaccess'''
&lt;pre&gt;
<pre>
SSLOptions +StrictRequire
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq &quot;localhost&quot;
SSLRequire %{HTTP_HOST} eq "localhost"
ErrorDocument 403 https://localhost/ruth_smith/
ErrorDocument 403 https://localhost/ruth_smith/


AuthName &quot;Uniform Server - Server Access&quot;
AuthName "Uniform Server - Server Access"
AuthType Basic
AuthType Basic
AuthUserFile /htpasswd/www/.htpasswd
AuthUserFile /htpasswd/www/.htpasswd
AuthGroupFile /htpasswd/www/.htgroup
AuthGroupFile /htpasswd/www/.htgroup
Require group ceo directors
Require group ceo directors
&lt;/pre&gt;
</pre>


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
Line 133: Line 132:
If you moved the servers see [[4.0-Mona: Multi-Servers | Multi-Servers]] remember to add the correct port numbers.
If you moved the servers see [[4.0-Mona: Multi-Servers | Multi-Servers]] remember to add the correct port numbers.


* This line: '''SSLRequire %{HTTP_HOST} eq &quot;localhost&quot;''' is checking the incoming request if a mismatch occurs an infinite redirection loop is set up.
* This line: '''SSLRequire %{HTTP_HOST} eq "localhost"''' is checking the incoming request if a mismatch occurs an infinite redirection loop is set up.
* Suppose the server was moved to ports Apache 81 Apache SSL 444 the '''.htaccess''' file for Dave Smith looks like this:
* Suppose the server was moved to ports Apache 81 Apache SSL 444 the '''.htaccess''' file for Dave Smith looks like this:
&lt;pre&gt;
<pre>
SSLOptions +StrictRequire
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq &quot;localhost:444&quot;
SSLRequire %{HTTP_HOST} eq "localhost:444"
ErrorDocument 403 https://localhost:444/dave_smith/
ErrorDocument 403 https://localhost:444/dave_smith/


AuthName &quot;Uniform Server - Server Access&quot;
AuthName "Uniform Server - Server Access"
AuthType Basic
AuthType Basic
AuthUserFile /htpasswd/www/.htpasswd
AuthUserFile /htpasswd/www/.htpasswd
AuthGroupFile /htpasswd/www/.htgroup
AuthGroupFile /htpasswd/www/.htgroup
Require group ceo directors
Require group ceo directors
&lt;/pre&gt;
</pre>
* To access the folder type the following '''&lt;nowiki&gt;http://localhoat:81&lt;/nowiki&gt;''' into a browser
* To access the folder type the following '''<nowiki>http://localhoat:81</nowiki>''' into a browser


'''''Note'':''' The above applies to all the '''.htaccess''' files.
'''''Note'':''' The above applies to all the '''.htaccess''' files.
Line 159: Line 158:
Add the root admin to the groups as shown:  
Add the root admin to the groups as shown:  


&lt;pre&gt;
<pre>
ceo:John root
ceo:John root
directors:&quot;Dave Smith&quot; &quot;Ruth Smith&quot; root
directors:"Dave Smith" "Ruth Smith" root
managers:Mike Jane Dawn root
managers:Mike Jane Dawn root
admin:root
admin:root
&lt;/pre&gt;
</pre>
Restart the browser log in to any user, use name/password root root.
Restart the browser log in to any user, use name/password root root.


Navigation menu