Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: permit a general user to access all directories in ubuntu 12.04

  1. #1
    Join Date
    Jul 2012
    Location
    Dhaka
    Beans
    271
    Distro
    Ubuntu 16.04 Xenial Xerus

    permit a general user to access all directories in ubuntu 12.04

    I'm using Ubuntu 12.04 as an administrator and I can access all the directories of my computer. Now I want to create another general user, who can access these directories, use wireless, mobile and wired connection without asking my (administrative) password.

    How can I do that? Please help anyone.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: permit a general user to access all directories in ubuntu 12.04

    Code:
    sudo adduser newuser sudo
    where newuser is the user whom you want to grant sudo powers.

  3. #3
    Join Date
    Jul 2012
    Location
    Dhaka
    Beans
    271
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: permit a general user to access all directories in ubuntu 12.04

    @schragge, thanks for your reply. I don't want to give a general user administrative privilege, but only to access these directories, use wireless, mobile and wired connection, sharing files on local network without asking my (administrative) password.

  4. #4
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: permit a general user to access all directories in ubuntu 12.04

    Quote Originally Posted by uzumakifahim View Post
    without asking my (administrative) password.
    Wait, it seems like you're misunderstanding what sudo does. When you add a user to the sudo group, he/she will be asked not yours, but his/her own password to gain root privileges. You can fine tune what rights a user gets with sudo by editing the /etc/sudoers file with the command
    Code:
    sudo visudo
    but you should be extremely cautious when doing this: an error editing this file may easily end in a disaster.

    Besides, there are some rights that may be granted to users by adding them to appropriate groups. Look at the output of
    Code:
    groups $USER
    to see what groups you as administrator are member of, and decide which of them the general user should be added to.

    E.g. you may want to add your general user to groups netdev and sambashare:
    Code:
    sudo adduser some_user netdev
    sudo adduser some_user sambashare
    Or do the same with one command
    Code:
    sudo usermod -aG netdev,sambashare some_user
    See the description of what different groups mean at Security/Privileges in Ubuntu Wiki.
    Last edited by schragge; March 2nd, 2013 at 06:31 PM.

  5. #5
    Join Date
    Oct 2011
    Location
    ZZ9 Plural Z Alpha
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: permit a general user to access all directories in ubuntu 12.04

    You can even create new usergroups with specific priveleges as well, if you want more than one user to have these capabilities.
    If a user is a member of sudoers, it won't ask for your password when they use sudo, it'll ask for their password.
    You do not want to give them complete non-root access to the filesystem. Make them use sudo- if nothing else it serves as a reminder that "Oh. These files are important. Perhaps I'd better not mess them up."

  6. #6
    Join Date
    Jul 2012
    Location
    Dhaka
    Beans
    271
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: permit a general user to access all directories in ubuntu 12.04

    Oh!!! Really thanks to both of you for this resourceful reply.

  7. #7
    Join Date
    Jul 2012
    Location
    Dhaka
    Beans
    271
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: permit a general user to access all directories in ubuntu 12.04

    @schragge, thanks for your clear explanations. It removes my misunderstandings. After adding a general user account to sudo group it can access all directories with it's own password, but problem is that it can also install/remove software. I don't want this.

    Actually, I'm trying to implement Ubuntu in a small office where general users will use computer for day to day use (office works, browsing etc.). They just need to use local hard drives. They don't need complete sudo privilege.

    Could you please tell me how can I do that?

  8. #8
    Join Date
    Jan 2008
    Location
    Nappanee, IN
    Beans
    602
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: permit a general user to access all directories in ubuntu 12.04

    You can either grant access to all directories including the system directories and installing software for the system, or you can confine them to their own /home/<user>/ set of folders. If you want to give them limited access to the directories other than their own folders, YOU are going to have to define exactly what privileges they need. If they are not to have sudo privileges on their own machines to mess them up at will, then they must have their privileges limited and are going to be bothering support much of the time to allow for system updates, changing their own passwords, making LAN connections, viewing thumb drives, connecting printers, etc. There is no set of limited privileges normally defined between keeping them out of their system configuration and full access.

    If you want to do a custom set of privileges, that is what group administration is for, define what a group can and can't do, then add the users to the group. But that will be completely custom, and we can't define it for you.

  9. #9
    Join Date
    Jul 2012
    Location
    Dhaka
    Beans
    271
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: permit a general user to access all directories in ubuntu 12.04

    @cwsnyder, thanks for the clarification. I find that gnome-system-tools is a good tool for this type of user management. It also allows to create new user groups, but how can I define privileges for a new user group in this tool? I don't get any help about this after web search. Is there any documentation for this?

  10. #10
    prodigy_ is offline May the Ubuntu Be With You!
    Join Date
    Mar 2008
    Beans
    1,219

    Re: permit a general user to access all directories in ubuntu 12.04

    It's actually possible to grant users fine-grained access to specific root-owned files/directories. Read up on Linux ACLs.

    It's also possible to grant access to certain tasks that require root privileges without granting full root access. For example you can specify (in /etc/sudoers) which programs user can run via sudo. Even if user needs interactive root shell for some reason you can limit what they can do there with AppArmor.
    Last edited by prodigy_; March 2nd, 2013 at 08:51 PM.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •