Results 1 to 7 of 7

Thread: root

  1. #1

    Default root

    I am trying to do something in the gnome terminal and it sais I need to sign on as root but when it comes up it does not ask me to sign on like YaST does so how do I sign on as root?

  2. #2
    Join Date
    Dec 2008
    Location
    Hamburg
    Posts
    458

    Default Re: root

    Hi,

    Quote Originally Posted by ralphpam View Post
    I am trying to do something in the gnome terminal and it sais I need to sign on as root but when it comes up it does not ask me to sign on like YaST does so how do I sign on as root?
    Enter

    Code:
    su
    and you will promted for root password. Type it and you are root. Don't forget to type

    Code:
    exit
    when you are ready. For more information type

    Code:
    man su
    hth

    Bye

    Erik

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,713
    Blog Entries
    1

    Default Re: root

    If you need to become root within a terminal, you use the

    su
    (superuser) command. Enter your root password when prompted. You can change back to regular user (joe for example) with

    su joe

  4. #4
    Join Date
    Oct 2008
    Location
    North Wales, UK
    Posts
    1,114

    Default Re: root

    Another way is to type: sudo 'command'.
    It will then ask for root password.

  5. #5
    Join Date
    Dec 2008
    Location
    Hamburg
    Posts
    458

    Default Re: root

    Hi,

    Quote Originally Posted by deano_ferrari View Post
    (superuser) command.
    su = substitute user not super user

    Bye

    Erik

  6. #6
    Join Date
    Jul 2008
    Location
    Pottstown PA, US
    Posts
    150

    Default Re: root

    Quote Originally Posted by deano_ferrari View Post
    If you need to become root within a terminal, you use the

    su


    (superuser) command. Enter your root password when prompted. You can change back to regular user (joe for example) with
    su joe
    Just want to add...If you are operating as root and issue the "su" command to switch to another user (joe, as in the example above), remeber that when you type "exit" as the user joe, the shell will exit and log out Joe's session, but will return you to the root login, since you did not log out of the root session before switching to Joe's session.

    Try to get in the habit of using the root user only when absolutely necessary. Its generally a good idea to give users (yourself included) the minimum permissions required to do what they need to do, no more, no less.

    That being said, when operating as root, you want to "get in, do what needs to be done, and get out." If you only have a single command to issue as root, I would suggest using su -c "your command here". The "-c" switch tells "su" to log in as the user root, issue the command you specified, and once the command is complete, immediately log out and return you to your normal user.


    You should also check out the "sudo" command. It does virtually the same thing as the "su -c" command. For example,
    executing the following command

    sudo /sbin/ifdown eth0

    is virtually the same as

    su -c "/sbin/ifdown eth0"

    but sudo has far more options...

    Sudo is very useful when you want to allow regular users to perform operations that require root permissions, but do not want to give out your root password. Sudo reads all of its configurations from /etc/sudoers. Sudo is relatively easy to configure using the visudo command (as root), or by using the Sudo utility in YaST (do NOT edit the /etc/sudoers file by hand, you MUST use one of the two methods described above). You can create groups of commands and allow users to issue those commands as root. Say for example, our user Joe, needs to be able to make changes to your network interfaces (a task usually reserved to the root user). You could give him the root password, let him do what he needs to do, and trust that he doesnt do anything (by accident or otherwise) to harm your system. Or, with sudo, properly configured, you can give him access to only what he needs without giving him your root password. Ubuntu and its derivatives make heavy use of sudo. (They even go so far as disabling the root login, you are not even prompted to create a root password when you install the operating system)
    Desktop| opensuse11.3| Core2Q Q9450 | nVidia GeForce 8800 GT
    Server| Arch | mythtv 024 | Core2D E7500| nVidia GT210
    HTPC| opensuse11.3 | mythtv 024| Atom 330 | ASUS AT3IONT-I Deluxe | nVidia ION
    Laptop| System76 | opensuse11.3| Core2D P8600 | nVidia 9300M

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,399

    Default Re: root

    For further information about the subject:SDB:Login as root - openSUSE
    Henk van Velden

Posting Permissions

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