how to find my username

hi
i have (cup) to set up for printer
and when i put my user name and password,it will not work.
i need my roots user name ?
i do not how ?
please can you give it( in details ),how to get my user name in the roots, i am a noob
i am using version 11.0 64bit
thanks

Usually, it is ‘root’. Hopefully, you know the root password as well, (since you did the install presumably).

yes i did the installation.how do you access the roots ?i know my password and my user name, but in the roots is not the same name, i think they put a @ in it. like it was a email

root’s name is root - I’m pretty sure it can’t be otherwise (although you can give root powers to another user).

To switch to root from a non-root terminal, type ‘su -’ without the quotes, then type your root password. Type exit to switch back. Or at a text login box you can just type ‘root’ when it asks for the username, and login directly as root.

If you’re unsure who you are at any given time, you can type ‘whoami’.

Read this, it is important: SDB:Login as root - openSUSE

And @danielt57: do not read the following, because it may make you uncertain. But it is only to be precise to @Confuseling.

The username *root *is not in fact the factor that makes *root **root. *It is the *uid, *which is *0. *You could change the name root into something else in /etc/passwd and in /etc/shadow, but I do not recommend it. Also having another user with some other name but with uid=0 and gid=0 can be done (a second root user), but is to be seen as a security breach (and should be tested upon by software that has to find these vulnarabilities).

Thanks for the clarification - I knew it gave root power to anyone with UID 0, but thought the name ‘root’ was hard-coded as well.

So - hypothetically - you can give several users the same UID, and if it’s 0 they’ll be given root powers automatically? Can you not also give root powers to a normal user by messing around with sudoers?

Interesting stuff…

thank guys for info
setting my printer with cup is getting more scary
if i understand this setup.((((Printer Sharing: Windows Print Server for Suse/openSUSE Linux Clients [Samba and LPD] ))))for my printer with cup is very bad not safe at all. because it asking for my root user name and password -------- did i get that right ?

That’s all well and good - Swerdna, whose page that is, is a moderator here, so if you can’t trust that you can’t trust anything… :wink:

The point is that you shouldn’t log in to your graphical environment as root (in fact I’m not even sure the system will let you by default).

If you need to do something as root, do it in a text console - normally by launching one from the menu. If you need to run a program which needs root powers (such as YaST), it’ll ask you for your root password - that’s fine too.

But don’t log in to your actual session, at the login screen at the beginning, as root, unless absolutely necessary.

hank guys for info
setting my printer with cup is getting more scary
if i understand this setup.((((Printer Sharing: Windows Print Server for Suse/openSUSE Linux Clients [Samba and LPD] ))))for my printer with cup is very bad not safe at all. because it asking for my root user name and password -------- did i get that right ?

It is normal for YaST and CUPS to require root (admin) privileges to configure printers etc.

It is allright that you are carefull, but you must also try to get to grips with the Linux concept of normal users and the root user. Unix/Linux is a multi user and multi session system. This holds true even if you think you are the only user of the system, because that is only a special case (and most people will have more users, like their spouse).

This means that for all sorts of things it is good to ask oneself: is this to be done for me, the end-user, or for all users because it is a feature of the system. Examples:
. When you want a nice wall paper on your desktop, that is for you, because your wife might want a totaly different wall paper. That is why these type of configurations are in your home directory and not in a general place (like /etc) and of course not in your wife’s home directory.
. The printer is a device to be used by all users on the system, so it must be configurated system wide. And that can only be done by root. Or would you think your son must have the power to change the printers configuration?

You must understand that confuring a printer is something done for the system and not for one usere

The name root is not hardcoded in the Kernel (where it counts), but it maybe hard coded in other software (even in a shell you wrote yourself).

Yes, that is possible and I have seen it done (on Unix), but it is seen as bad practice and I have seen scripts, that look for security vulnarabilities, testing for it (during their check of /etc/passwd).

Thanks again. :slight_smile:

thanks for info