Announcement

Collapse
No announcement yet.

not clear on sudo

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    not clear on sudo

    I'm confused as to how sudo works. I've already read the info in the Ubuntu wiki, but it still isn't clear to me.  I'm guessing you must use sudo whenever you need to run a root-level command.  I'm used to doing su, running the command(s) and exiting.  Are you unable to do this in Kubuntu?  I also didn't understand the part about enabling and disabling the root password.  How does sudo tie into that?

    Also, what's the difference between sudo and kdesu?

    #2
    Re: not clear on sudo

    Sudo is like su, except it doesn't turn the whole shell into a root shell (although you could make it do that too). It's just a quick root command. This is good for people who may accidentally forget to exit the su command. You can enable su in Kubuntu, but there's no need to since you can sudo instead. Like, lets say you want to edit your sources.list file (for apt-get).
    The su way:
    Code:
    su
    password: ******
    kwrite /etc/apt/sources.list
    exit
    Now, if you forget to exit, you may be in a world of trouble if someone comes onto your computer and messes up stuff. The same goes with a graphical root login (which is also disabled btw, but you can enable it, read the guide for that).
    Now in sudo:
    Code:
    sudo kwrite /etc/apt/sources.list
    password: ******
    and after you press <enter/return> the su action will perform, and exit automatically.

    And kdesu (KDE super user?) is used when you want to run a graphical app. Such as konqueror, systemsettings, etc, as root. Sudo is mostly used for commands, such as sudo apt-get install <package name> or sudo apt-get update
    <br /><br />*temp. hiatus from forums due to comp + net broken* :&#039;(

    Comment


      #3
      Re: not clear on sudo

      you can use sudo for running command from console. You must not run GUI application with sudo. use kdesu for running GUI applications.

      sudo is kinda like su. you can think sudo as "Do this thing as su (Super user)". As for disabling/enabling root password. Root password is disabled by default in kubuntu. You must use sudo/kdesu for run programs as root. This is done for a security reason. If root password is disabled you/nobody can't login as root. so there is no chances that someone can gusse your root password or can to run a brute force attack against your root account to crack your root password.

      sudo is quite easy to use, once you become habitual to it.
      cheers!
      -=|From the desk of|=-
      «•´`•.(*•.¸(`•.¸ ¸.•´)¸.•*).•´`•»
      «•´¨*•.¸¸whoiam55.¸¸.•*¨`•»
      «•´`•.(¸.•´(¸.•* *•.¸)`•.¸).•´`•»
      Reg. Linux User # 400637

      Comment


        #4
        Re: not clear on sudo

        Here's the difference:

        Code:
        su
        password:
        apt-get update
        apt-get install whatever
        exit
        exit
        Code:
        sudo apt-get update
        password:
        sudo apt-get install whatever
        exit
        The idea (whether you like it or not is another issue) is that you have to be consciously aware of every action you type in that requires root privileges because you're always typing sudo in front of it, and you don't have to remember to exit out of sudo (the privileges will time out in fifteen minutes--and you can change the timeout length as well).

        For more on this: https://wiki.ubuntu.com/RootSudo
        Linux is ready for the desktop--but whose desktop?<br />How to install software in Kubuntu

        Comment


          #5
          Re: not clear on sudo

          you can type 'sudo su' if you want to use the su command.

          Comment


            #6
            Re: not clear on sudo

            Thanks for the info, guys.

            Comment

            Working...
            X