LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-28-2014, 06:07 AM   #1
chuikingman
Member
 
Registered: Aug 2009
Posts: 91

Rep: Reputation: 16
su root or login root


Hi,
I find there is some customized linux with application.
When I use login account root and type the password.
It is not allow to login.
But if I login with specified user and password.
Then I use command "su - " and type root passwd.
It allow you to switch to "root" account .

Or if i use "su - root" and type password .it is not allow to login again .

It is strange I cannot login if I specified to use "root" account .


How to make this setting ..

Please advice in detailed.
 
Old 03-28-2014, 07:20 AM   #2
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Many Linux distros block direct root login as a security feature. Every hacker who knows anything will try to brute-force "root" username so it's a good idea to lock it.
 
Old 03-28-2014, 07:32 AM   #3
chuikingman
Member
 
Registered: Aug 2009
Posts: 91

Original Poster
Rep: Reputation: 16
So,
How to make this setting ??
Please advice in detailed.....
 
Old 03-28-2014, 07:33 AM   #4
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Which distro are you using and why do you find it inconvenient to type "su -" as a security precaution?
 
Old 03-28-2014, 07:40 AM   #5
chuikingman
Member
 
Registered: Aug 2009
Posts: 91

Original Poster
Rep: Reputation: 16
I want to know how can I make this setting in normal linux OS ..
I want to reproduce this .....
Please advice in detailed....
 
Old 03-28-2014, 07:41 AM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
It's best to leave it this way. Its an extra layer of security. And really, it doesn't take but an extra 2 seconds to login with su -
 
Old 03-28-2014, 07:43 AM   #7
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
I can't help you if you refuse to tell us which distro you are using. Have a nice day!
 
Old 03-28-2014, 08:18 AM   #8
LinuxGeek2305
Member
 
Registered: Dec 2013
Location: Lawton, Oklahoma
Distribution: Arch.
Posts: 91

Rep: Reputation: Disabled
Might be more secure if you used sudo or chroot/fakeroot instead of using root directly.
 
Old 03-28-2014, 10:44 AM   #9
yo8rxp
Member
 
Registered: Jul 2009
Location: Romania
Distribution: Ubuntu 10.04 Gnome 2
Posts: 102

Rep: Reputation: 31
or can edit sudo visudo and make it not to prompt for password globally or per application , but highly not recommended :

username ALL=(ALL) NOPASSWD: ALL
 
Old 03-28-2014, 02:35 PM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you still have not answered the question
What Operating System is this ?

su and su - are used as default on RHEL based systems

BUT
RHEL / CentOS /SL all allow root gui login !!! use at own RISK!!!

Now , Fedora DOSE NOT!!!!!!!

so a guess here
you are using fedora


there is a so called " pam hack"
that is NOT RECOMMENDED !!!!!!!!!!!
it causes all kinds of problems
problems that will basically turn the fedora install into a "horror story"
and a pain in the rear end to even try to use

Warning:
DO NOT USE THAT HACK!!!!!!!


PS
and what ever you do
DO NOT do this!!!!!!!!!!!!!!!!!
Code:
"username ALL=(ALL) NOPASSWD: ALL"
DO NOT!!!!!!!!!!!!
do not set up a normal user as root with no pasword
!!!!! a very very VERY BAD IDEA!!!!!!!!

Last edited by John VV; 03-28-2014 at 02:38 PM.
 
  


Reply



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
Unable to login using root after changing root password using passwd command rodimail SUSE / openSUSE 3 12-27-2011 10:34 PM
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 04:27 PM
Root Account Disabled (not smart) Can not root LOGIN mitchellray Slackware 12 06-30-2009 12:52 PM
root login incorrect ,then passwd root,but error sunnycn Linux - Security 6 05-20-2002 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:19 PM.

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
Open Source Consulting | Domain Registration