Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: how do i stop a user using sudo

  1. #1
    Join Date
    Dec 2008
    Location
    australia
    Beans
    210
    Distro
    Ubuntu 11.04 Natty Narwhal

    how do i stop a user using sudo

    im trying to set up ubuntu for someone that cant use windows and whould like to remmove them form using sudo as they might do something to destroy the computer (they have know idea what they are doing) can i do this without disabeling updates and add/remove userbility
    thank you

  2. #2
    Join Date
    May 2009
    Location
    Thunder Bay
    Beans
    1,205
    Distro
    Ubuntu Karmic Koala (testing)

    Re: how do i stop a user using sudo

    dont tell them the root password

  3. #3
    Join Date
    Oct 2007
    Beans
    170

    Re: how do i stop a user using sudo

    dont make them part of the admin group
    Dell Studio XPS 1645, Intel I7 720QM, 4GB DDR 3 1333, SONY NEC BC-5600S Blu-Ray / dvd drive, ATI 4670

  4. #4
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    7,905

    Re: how do i stop a user using sudo

    Edit /etc/sudoers

  5. #5
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: how do i stop a user using sudo

    Quote Originally Posted by philcamlin View Post
    dont tell them the root password
    by default, the root account password is locked.

    Quote Originally Posted by jarrah-95 View Post
    im trying to set up ubuntu for someone that cant use windows and whould like to remmove them form using sudo as they might do something to destroy the computer (they have know idea what they are doing)
    Quote Originally Posted by surfed View Post
    dont make them part of the admin group
    +1

    Quote Originally Posted by jarrah-95 View Post
    can i do this without disabeling updates and add/remove userbility
    thank you
    for this you have to edit the sudoers file and append it with something like:
    Code:
    username ALL=(ALL) /usr/sbin/synaptic
    For more info read this:
    HowTO: Sudoers Configuration

    EDIT: always edit the file with the sudo visudo command.

  6. #6
    Join Date
    Dec 2008
    Location
    australia
    Beans
    210
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how do i stop a user using sudo

    i dont think theyre in the admin but i can still use sudo when i try also if i removed them from the sudoers file whouldent that stop them from using the updates and add/remove

  7. #7
    Join Date
    May 2009
    Location
    Thunder Bay
    Beans
    1,205
    Distro
    Ubuntu Karmic Koala (testing)

    Re: how do i stop a user using sudo

    they cant use updates if they dont know the admin password.

  8. #8
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: how do i stop a user using sudo

    Quote Originally Posted by jarrah-95 View Post
    i dont think theyre in the admin but i can still use sudo when i try also if i removed them from the sudoers file whouldent that stop them from using the updates and add/remove
    By default, only members of the admin group may gain root privileges. This is the relevant part in the sudoers file:
    Code:
    %admin ALL=(ALL) ALL
    If you want to allow user bob to use update-manager, add/remove programs(gnome-app-install) and synaptic package manager follow this steps:
    1. remove bob from the admin group:
      Code:
      sudo deluser bob admin
    2. edit the sudoers file:
      Code:
      VISUAL=gedit sudo -E visudo
    3. add this line to the end of the file:
      Code:
      bob ALL=(ALL) /usr/sbin/synaptic
      save the file and exit.



    your sudoers file should look like this:
    Code:
    # /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
    
    # Host alias specification
    
    # User alias specification
    
    # Cmnd alias specification
    
    # User privilege specification
    root	ALL=(ALL) ALL
    
    # 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
    
    bob ALL=(ALL) /usr/sbin/synaptic
    Last edited by sisco311; June 28th, 2009 at 01:08 AM.

  9. #9
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: how do i stop a user using sudo

    Quote Originally Posted by philcamlin View Post
    dont tell them the root password
    Ubuntu disables the root account. There is no root password.

  10. #10
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: how do i stop a user using sudo

    Create a limited account for the user. Go to System-->Administration-->Users & Groups, to setup a user and set what permissions he/she needs. To make it easier on them you may want to set up autologin too.

Page 1 of 2 12 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
  •