LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't directly log on as SU in console (https://www.linuxquestions.org/questions/linux-newbie-8/cant-directly-log-on-as-su-in-console-4175486265/)

theKbStockpiler 11-29-2013 11:22 AM

Can't directly log on as SU in console
 
When I Control>Alt> f1 and go to the console, I can only log in as su after I log in as my user name. Why is this? :confused:

snowday 11-29-2013 11:31 AM

Do you have a user named 'su' on the system, or are you trying to get into the 'root' account? The username for 'root' is 'root' (not 'su').

It might also be that you are using a distribution (such as Ubuntu) where direct root login is disabled?

r41d3n 11-29-2013 01:17 PM

su is supposed to be used after logon.

jefro 11-29-2013 02:59 PM

Correct, su is a shell command, not a user name unless you did actually create a user called su. Correct also that in some cases a direct logon to root may be disabled.

Su is really a command to switch user. With no user name added most distro's default to su root. You can su bob or su sally or such. If your root has been renamed to fred then su fred would be admin/root.

We tend to suggest that you log on to your user and then use the command sudo. The password would be your users password.

Example.

sudo apt-get install wine

instead of su
password
apt-get install wine

John VV 11-29-2013 03:09 PM

in fedora you can NOT login as root
-- unless it is a TEXT only boot

in a text only boot it is easy
username : root
password : your root password

youniqueg33k 11-29-2013 04:46 PM

Quote:

Originally Posted by theKbStockpiler (Post 5072501)
When I Control>Alt> f1 and go to the console, I can only log in as su after I log in as my user name. Why is this? :confused:

Simply put, hitting the alt_F1 tells the system to start a whole new login, so before you can use "su" to sign in, you must log in as a user to begin with. Then you can log in using the "su" command. It happens like that because the system needs the user logged in in order for it to very the user credentials assigned to that user (as listed in the /etc/group file.) For a clear example, an administrator may have restricted a user to be able to not play games only or use the sudo command to make changes, say if it was a computer at a company to keep play time and systems security in check. If the user was not assigned to the adm, trusted, root, or wheel group, then using a virtual terminal login will not allow a user to use "su" at that point.

Oh, and as mentioned above, Ubuntu users must issue the command "sudo su" first before ever being allowed to login using "su". It's a double check for additional security to verify admin rights, essentially.

lleb 11-29-2013 05:32 PM

Quote:

Originally Posted by theKbStockpiler (Post 5072501)
When I Control>Alt> f1 and go to the console, I can only log in as su after I log in as my user name. Why is this? :confused:

http://www.linuxmanpages.com/man1/su.1.php

you are correct. if you wish to log in as root, then log in as root, but better to log in as user, then su - over to root properly.

theKbStockpiler 11-29-2013 08:02 PM

Thanks for all the replies!
 
I actually never gave it that much thought and I totally forgot about the root user. I thought (su) stood for superuser and that was a users name. I'm centered on Mandriva's 10 logic and I think Scientific/Centos where as you can switch to root user and also be in X which is nice and never understood the sudo type of logic.There is a huge void in my linux understanding of the sudo thing. I have read many a turtorial on it and it seems like total BS. When I try to login as su it does display "incorrect login" because there is no user account of su of coarse.


The console is what you interface with when X is not running correct? Is the log in application its own or is it a command that is part of a shell, a shell being a occurace of Bash? :scratch:

btmiller 11-29-2013 08:11 PM

The console is a hardware device on your system (usually hooked up to the keyboard and monitor, but there are other types such as serial consoles -- back in the olden days VT-100 terminals were hard-wired into a minicomputer). Linux (and other *nix-OSes abstract its functionality so you can have multiple virtual terminals (usually there are 6 tty1-tty6 on a Linux box, but there can be more or less depending on the config). These virtual devices are configured to run /bin/login, which is what actually accepts a user name and password (or other credential like a smart card when thsoe are used for authentication). Most systems nowadays actually use PAM (pluggable authentication modules) to do the heavy lifting of authenticating a user. This is so admins can customize how users are authenticated in a consistent way accross multiple aplications (e.g. terminal logins, ssh, ftp, the su command itself, etc.).

Once a user log in to a text-based console, whatever shell is configured in /etc/passwd (or its moral equicalent, such as an LDAP directory) is executed. The bash shell is just one of several available on Linux and Unix systems, but it's probably the most widely used. Other popular ones are csh, tcsh, ksh, and zsh, all of which havbe slightly different command sets and features (bash, ksh, and zsh are all related back to the Bourne shell, while csh and tcsh use a rather different command set). If the user wishes to use a graphical desktop, they must start it by hand (usually by typing "startx" on a properly-configured system), Most desktop systems, though, are configured to start a graphical login manager at startup, which can also accept authentication credentials and start up a grtaphical desktop for the user.


All times are GMT -5. The time now is 07:26 AM.