Results 1 to 3 of 3

Thread: su -c and sudo

  1. #1
    Join Date
    Feb 2012
    Beans
    19

    su -c and sudo

    su -c command allows one to enter only single command like sudo without entirely logging to root.

    So, is su -c equivalent to sudo in security or still I must use sudo?

  2. #2
    Join Date
    Sep 2008
    Location
    Italy
    Beans
    96
    Distro
    Ubuntu Studio 12.04 Precise Pangolin

    Re: su -c and sudo

    logging into the root account is never 100% "secure".

    for your own personal machine it probably won't make too much difference, but worked into a program "sudo" is probably a better choice.

    Every user who wants to use the "su" command must know the root password (not set by default on fresh install). Multiple users who want to use the "su" command would have to know the root password, this is not secure. Just use sudo, it's easier that way and you will only have to remember 1 password, not 2.

    "sudo" let's you run a command as an admin (if you have the priviliges to run admin commands) and the password is the user password, unique for each person. If you're dealing with multiple users add them to the list of users with sudo priviliges, but never give away the root password!
    Last edited by AstroLlama; December 5th, 2012 at 03:59 PM.

  3. #3
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: su -c and sudo

    Quote Originally Posted by sunveer View Post
    su -c command allows one to enter only single command like sudo without entirely logging to root.

    So, is su -c equivalent to sudo in security or still I must use sudo?
    try:
    1. sudo /bin/bash
    # env > blu
    # exit
    su
    pa.....
    # env > bla
    # exit
    $ diff -y blu bla
    this can result in problems wich are hard to find.
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

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
  •