LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2013, 12:22 PM   #1
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: Fedora14,Scientific 6.1?, Mandriva 2010 ;GO MAGEIA!!!Next up Gentoo
Posts: 838

Rep: Reputation: 51
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?
 
Old 11-29-2013, 12:31 PM   #2
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 4,037

Rep: Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099
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?

Last edited by snowpine; 11-29-2013 at 12:37 PM.
 
1 members found this post helpful.
Old 11-29-2013, 02:17 PM   #3
r41d3n
Member
 
Registered: Mar 2013
Distribution: Debian
Posts: 42

Rep: Reputation: Disabled
su is supposed to be used after logon.
 
1 members found this post helpful.
Old 11-29-2013, 03:59 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
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

Last edited by jefro; 11-29-2013 at 04:02 PM.
 
Old 11-29-2013, 04:09 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
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
 
Old 11-29-2013, 05:46 PM   #6
youniqueg33k
LQ Newbie
 
Registered: Nov 2013
Location: Moorhead, Minnesota
Distribution: Fedora KDE, and Android 4.3 Cyanogenmod 10.2
Posts: 8

Rep: Reputation: 2
Quote:
Originally Posted by theKbStockpiler View Post
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?
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.

Last edited by youniqueg33k; 11-29-2013 at 05:48 PM. Reason: additional info
 
Old 11-29-2013, 06:32 PM   #7
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
Originally Posted by theKbStockpiler View Post
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?
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.
 
Old 11-29-2013, 09:02 PM   #8
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: Fedora14,Scientific 6.1?, Mandriva 2010 ;GO MAGEIA!!!Next up Gentoo
Posts: 838

Original Poster
Rep: Reputation: 51
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?

Last edited by theKbStockpiler; 11-29-2013 at 09:04 PM.
 
Old 11-29-2013, 09:11 PM   #9
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and/or Apache to Log Directly to remote syslog? helptonewbie Linux - Server 1 11-24-2011 07:06 AM
root user must not be allowed to directly login to service console dimpleboy Linux - Newbie 4 05-12-2011 10:08 PM
Log in as root directly abhi_69 Linux - Newbie 5 07-29-2008 10:11 AM
output apache log directly to tty2 coal-fire-ice Linux - Server 4 04-26-2007 07:48 PM
I want to grant 'shutdown' previlege to a non-root user to do directly from console jagadee76 Linux - General 6 12-29-2004 04:16 AM


All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration