Allow Downloads

Asked by pastormatt on 2009-04-07

I am still using Intrepid Ibex and I have two questions.
1. I have two users one is admin, set as "superuser" and another user that does not have admin rights. I would like to give this user as much access to the web as possible but block as much "adult content" as possible. With the settings now, user can not download anything (files, docs, programs,etc...). Will you direct me to specific settings to allow downloads, but still block the adult content?

2. The next issue I run into now is that when I log into as user and attempt to change settings in the Web Content Control I am prompted for a password, but no passwords will work. I have tried the admin password, the user password, and the root password. I would like to be able to type the admin password or really any password, that the user does not know of course, and allow an acceptable site, download, etc...

Any assistance would be much appreciated!
Thanks,
Matthew

Question information

Language:
English Edit question
Status:
Answered
For:
WebContentControl Edit question
Assignee:
No assignee Edit question
Last query:
2009-04-15
Last reply:
2009-04-16

1.
In order to allow downloads you must edit "Blocked file extensions" in the Filter settings tab... once you open it you must add "#" symbol at the beginning of every line with the file extension you want to allow.
for example:
#.doc # Word document
#.zip # Windows compressed file
#.mp3 # Music file

and you must do the same thing with "Blocked MIME Types":
#audio/mpeg
#video/quicktime
#application/zip

2.
When you try to change Web Content Control settings, you are asked for the current user password. But the user needs administrative rights to apply any change. You can grant administrative rights to an user running "users-admin".

KIAaze (zohn-joidberg) said : #2

Thanks for answering!
I'm finally not alone in answering anymore. :D

pastormatt (mcfroah) said : #3

Francisco,
Thank you for your reply.
I edited the blocked file extensions and all seems good from this point.

 The user is an admin. Is there a difference between a admin and a "user-admin"?

I have read all the articles I can find about root, sudo, and su users, but need to only "block" this user from changing settings in Web Content Control. Thanks for the reply and I can put this post in new if needed...

KIAaze (zohn-joidberg) said : #4

I don't think there's a difference between admin and user-admin (unless it refers to "root" and "normal user with admin powers").

If you want to "only "block" this user from changing settings in Web Content Control", you'll have to restrict his admin permissions.

1) What exactly does the user need admin permissions for?

2) Edit /etc/sudoers so that the user is only allowed to run the necessary commands with sudo

I don't have time to explain how to edit it right now, but I'll post again later. ;)

pastormatt (mcfroah) said : #5

Thanks for the reply.
1) I would like to allow the user have admin rights for configuring their
desktop, adding programs, etc.. basically only block access to the Web
Content Control.

2) Is there a way to have user1 blocked to change settings in Web Content
Control and have user2 change settings in Web Content Control for both user1
and user2?

On Tue, Apr 14, 2009 at 6:55 PM, zoidberg <
<email address hidden>> wrote:

> Your question #66780 on WebContentControl changed:
> https://answers.launchpad.net/webcontentcontrol/+question/66780
>
> Status: Open => Answered
>
> zoidberg proposed the following answer:
> I don't think there's a difference between admin and user-admin (unless
> it refers to "root" and "normal user with admin powers").
>
> If you want to "only "block" this user from changing settings in Web
> Content Control", you'll have to restrict his admin permissions.
>
> 1) What exactly does the user need admin permissions for?
>
> 2) Edit /etc/sudoers so that the user is only allowed to run the
> necessary commands with sudo
>
> I don't have time to explain how to edit it right now, but I'll post
> again later. ;)
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/webcontentcontrol/+question/66780/+confirm?answer_id=3
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/webcontentcontrol/+question/66780
>
> You received this question notification because you are a direct
> subscriber of the question.
>

KIAaze (zohn-joidberg) said : #6

Sorry for the long delay.

"1) I would like to allow the user have admin rights for configuring their
desktop, adding programs, etc.. basically only block access to the Web
Content Control."

As I said, think in terms of what you want to allow, not what you want to forbid.
By default, a non-admin user does not have any admin rights.
Configuring the desktop does not require admin rights.

So what you want is allow him to use apt-get and eventually synaptic and/or aptitude.
You may even want to restrict him to installing and/or upgrading programs to avoid him simply uninstalling webcontentcontrol!

The solution is to edit /etc/sudoers.
Back it up first:
=========
sudo cp /etc/sudoers /etc/sudoers.bak
=========

Then simply run the following command in a terminal:
=========
sudo visudo
=========

Here is a heavily commented sudoers file, which will hopefully allow you to do what you want:
=====================
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults env_reset
#Defaults targetpw

# Host alias specification

# User alias specification
User_Alias PARTIALADMINS = newbie

# Cmnd alias specification
Cmnd_Alias SHUTDOWN = /sbin/halt, /sbin/shutdown -h now, /sbin/reboot

Cmnd_Alias UPGRADE = /usr/bin/apt-get update, /usr/bin/apt-get upgrade, /usr/bin/apt-get --simulate upgrade

Cmnd_Alias LOCATE = /usr/bin/updatedb

Cmnd_Alias CLEANUP = /usr/bin/apt-get clean

Cmnd_Alias WIFI = /sbin/pccardctl *

# User privilege specification
#SYNTAX: USER MACHINE = (RUNAS) COMMANDS

#To know what commands are allowed for a user, you can so the following:
# su USER (switches to this user)
# sudo -l (lists all allowed commands)

#Always use full paths for the commands, you can use the following command to get it:
# which COMMAND

#Leave this one as is!
root ALL=(ALL) ALL

#All users defined in PARTIALADMINS can run all commands defined in SHUTDOWN without a password and the ones defined in CLEANUP, LOCATE and WIFI with a password
PARTIALADMINS ALL = NOPASSWD: SHUTDOWN, PASSWD: CLEANUP, LOCATE, WIFI

#superman2 can use all apt-get commands (update, upgrade, install, remove, etc) and synaptic (which automatically allows install/remove/etc of packages)
superman2 ALL = /usr/bin/apt-get, /usr/sbin/synaptic

#newbie2 can only install programs
newbie2 ALL = /usr/bin/apt-get install

# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
# %sudo ALL=NOPASSWD: ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
=====================

Otherwise, here are some good tutorials about the sudoers file:
https://help.ubuntu.com/community/Sudoers
http://www.gratisoft.us/sudo/man/sudoers.html

KIAaze (zohn-joidberg) said : #7

"2) Is there a way to have user1 blocked to change settings in Web Content
Control and have user2 change settings in Web Content Control for both user1
and user2?"

Filter settings are applied to all users by default currently.
Otherwise, just don't add user1 to the admin group to block him from changing the settings.
Adding a user to the admin group allows him to do everything by default. If you want to fine tune his permissions, DON'T add him to the admin group and use method explained above.

I figured out how to enable user-specific filtering, but this is out of the scope of this question.
cf here if you're interested: http://tech.groups.yahoo.com/group/dansguardian/message/22651

KIAaze (zohn-joidberg) said : #8

Can you help with this problem?

Provide an answer of your own, or ask pastormatt for more information if necessary.

To post a message you must log in.