Differences
This shows you the differences between two versions of the page.
linux_wiki:configure_group-managed_content [2018/05/06 23:46] billdozor [Group Protected Setup] |
linux_wiki:configure_group-managed_content [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Configure Group-managed Content ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Group managed content for collaboration. | ||
- | |||
- | ---- | ||
- | |||
- | ====== Lab Setup ====== | ||
- | |||
- | The following virtual machines will be used: | ||
- | * server1.example.com (192.168.1.150) -> Perform all connectivity tests from here | ||
- | * server2.example.com (192.168.1.151) -> Install Apache Web Server here | ||
- | |||
- | |||
- | **Previous Sections Completed** | ||
- | * [[linux_wiki: | ||
- | * Except leave listening on port 80/tcp | ||
- | * [[linux_wiki: | ||
- | * [[linux_wiki: | ||
- | |||
- | ---- | ||
- | |||
- | ====== Basic Apache Directory Setup ====== | ||
- | |||
- | Create directory to use | ||
- | <code bash> | ||
- | mkdir / | ||
- | </ | ||
- | |||
- | \\ | ||
- | Create users and a developers group that will have access to the directory to manage the content | ||
- | <code bash> | ||
- | useradd robert | ||
- | useradd steve | ||
- | groupadd developers | ||
- | </ | ||
- | |||
- | \\ | ||
- | Add users to the group | ||
- | <code bash> | ||
- | usermod -G developers robert | ||
- | usermod -G developers steve | ||
- | </ | ||
- | |||
- | \\ | ||
- | Set permissions of new directory | ||
- | <code bash> | ||
- | chown :developers / | ||
- | chmod 771 / | ||
- | </ | ||
- | |||
- | \\ | ||
- | Create index file | ||
- | <code bash> | ||
- | echo " | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== Group Protected Setup ====== | ||
- | |||
- | **Help**: Available if you installed ' | ||
- | * Then follow the " | ||
- | |||
- | \\ | ||
- | Create the groupdb file (list group members) | ||
- | <code bash> | ||
- | vim / | ||
- | |||
- | developers: robert steve | ||
- | </ | ||
- | |||
- | \\ | ||
- | Create the user entries in the userdb password file | ||
- | <code bash> | ||
- | htpasswd / | ||
- | htpasswd / | ||
- | htpasswd / | ||
- | </ | ||
- | * Prompted for password each time | ||
- | * Give ' | ||
- | * No " | ||
- | |||
- | \\ | ||
- | Edit the vhosts.conf and add a directory auth section for the new devel-group directory | ||
- | <code bash> | ||
- | vim / | ||
- | |||
- | < | ||
- | ServerName redsite.example.com | ||
- | DocumentRoot / | ||
- | # | ||
- | |||
- | < | ||
- | AuthType Basic | ||
- | AuthName "Group Auth - Enter Credentials" | ||
- | AuthGroupFile "/ | ||
- | AuthUserFile "/ | ||
- | Require group developers | ||
- | </ | ||
- | </ | ||
- | * Now only users in the userdb file AND in the " | ||
- | * robert and steve should be allowed in, monty should be denied. | ||
- | |||
- | \\ | ||
- | Restart httpd | ||
- | <code bash> | ||
- | systemctl restart httpd | ||
- | </ | ||
- | |||
- | \\ | ||
- | View group protected directory | ||
- | <code bash> | ||
- | elinks http:// | ||
- | </ | ||
- | * Prompted for username/ | ||
- | |||
- | ---- | ||