Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deny some users User Directorys

Status
Not open for further replies.

axman505

Technical User
Jun 20, 2001
489
US
Hello,

Is there any easy way to deny some users a user html directory?

I was thinking, that the httpd.conf file could call to include a file when it is loading and setting up the userdirectorys options. If the file contained a list of users to deny, i.e.:

Disabled root jim john

this would do the trick, right? Does anyone know of an easier way to configure this?

We might be better of with a list of users to allow, rather than a list to deny. We will be using either LDAP authentication or will be configuring accounts via scripts.

Your input is appreciated. Thanks.
 
Your best bet using ldap is :


mod_auth_ldap

This should give you some control over access.

Other then that you can use your scripts to write a big deny file but that would require an apache HUP since only .htaccess is per transaction and if you put a .htaccess in a dir the user can delete it, removing your restrictions.
 
Will this work with groups as well?

i.e

disable no_html_group

Thanks
 
I have never seen this 'disabled' command and do not see it in the 2.0 Apache docs.

What you could do is :

Require group group-name [group-name] ...
Only users in the named groups can access the resource.

Where group is the name of the group that has access. Add valid users to that group and you'll be set.
 
I doubt that will work with groups, try it though and let us know.

I'd go with a require / group rule in this case and then write my setup software to update the group file as required.

 
I have a new delima. We have an AliasMatch setup as follows for user website:

AliasMatch ^/users/([a-zA-Z0-9]+)/?(.*) /home/$1/html/$2

When i tried to disable a test user with the following configuration file entry:

Disabled root test

It only disables access to the test account via:

I can still access the test account via:

Is there any way to solve this problem?

Thanks.
 
SirCharles, what were you thinking could be done in the .htaccess file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top