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

Thread: Correct Use of SUDO

  1. #1
    Join Date
    Jan 2014
    Beans
    9

    Correct Use of SUDO

    Hi there!

    I am aware of the need to use SUDO every once in a while (like now, when installing Calibre from the binaries as suggested on their project website). I keep wondering what Ubuntu's approach to using SUDO looks like. The last time around when I was using Linux, I could do SUDO from within my regular-use, every-day account. Running Ubuntu 13.10, I cannot do so. I have to log out, and then log in as administrator to use any SUDO command. I find that quite bothersome, but I am guessing this is for a reason.

    So how do I properly use SUDO? Do I really have to log out of my regular user account and log into my administrator account for every single thing that involves SUDO?

    All the best,

    Adam

  2. #2
    Join Date
    Dec 2013
    Beans
    34

    Re: Correct Use of SUDO

    Are you capitalizing SUDO in the terminal? If you are, then that's the problem. It needs to be lowercase.
    I've never had to log out of my account and log in as root in order to execute a command as super user. In fact I believe that it's highly discouraged, as you could easily break something.

  3. #3
    Join Date
    May 2013
    Location
    Hamunaptra
    Beans
    618
    Distro
    Ubuntu Gnome Development Release

    Re: Correct Use of SUDO

    You should be able to log in as regular user and use 'sudo' e.g.

    Code:
    sudo apt-get update
    sudo apt-get install <packagename>
    sudo apt-get autoclean 
    etc
    First point of start should be

    Code:
    man sudo
    this will give the man pages.

    In case you are not able to use sudo e.g. sudo apt-get update as a regular user, please revert back.
    I am not that conversant with it, but others will be able to help.
    Last edited by su:bhatta; April 2nd, 2014 at 10:30 AM.
    bhatta

    May the Source be with you !
    Ash nazg durbatulûk, ash nazg gimbatul, ash nazg thrakatulûk, agh
    'Buntu-ishi krimpatul !

  4. #4
    Join Date
    Jan 2012
    Location
    London, UK
    Beans
    611
    Distro
    Ubuntu Development Release

    Re: Correct Use of SUDO

    Hi there!

    same as it ever was; sounds like the user you added isn't in the sudoers file?

    Code:
    sudo usermod -aG sudo <username>

  5. #5
    Join Date
    Mar 2014
    Location
    Greater Noida,UP,India
    Beans
    78
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Correct Use of SUDO

    No its not necessary,you just have to use sudo with your current user name and it will work fine.Or you can change root passwd using: sudo passwd root......
    and then type su...to become the root user,....
    Nav

  6. #6
    Join Date
    Jan 2012
    Location
    London, UK
    Beans
    611
    Distro
    Ubuntu Development Release

    Re: Correct Use of SUDO

    We're not supposed to advise enabling root

  7. #7
    Join Date
    Mar 2014
    Location
    Greater Noida,UP,India
    Beans
    78
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Correct Use of SUDO

    Yup.........it is not advisable for a long session......
    Nav

  8. #8
    Join Date
    Nov 2010
    Beans
    13

    Re: Correct Use of SUDO

    sudo for command-line utilities, gksudo for GUI apps started from the terminal.

    http://psychocats.net/ubuntu/graphicalsudo

  9. #9
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    switching users

    It is not necessary to log out in order to switch users. You have in the far upper right corner a symbol that is a cross between the on/off icon and a gear. In that you can choose another account and use that for a while. Then when you log out of that other account's session, you can get back to the original account's session just as it was.

  10. #10
    Join Date
    Jul 2007
    Location
    UK
    Beans
    17,055
    Distro
    Ubuntu Development Release

    Re: Correct Use of SUDO

    +1 Lars.

    It sounds like the OP set up a non admin user account for regular use.

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
  •