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?

Hi,

Enter


su

and you will promted for root password. Type it and you are root. Don’t forget to type


exit

when you are ready. For more information type


man su

hth

Bye

Erik

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

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

Hi,

su = substitute user not super user :wink:

Bye

Erik

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)

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