The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Prevent users logging in as root Sepia SUN Solaris 3 06-05-2008 10:45 AM
User not able to login directly using ssh sag71155 HP-UX 2 03-26-2008 04:53 AM
Can't login root account due to can't find root shell neikel AIX 2 01-30-2008 07:07 PM
How to prevent local root from su to an NIS user? nfw UNIX for Advanced & Expert Users 3 01-08-2008 09:38 AM
How to prevent root users from editing files (logs) vehchi UNIX for Dummies Questions & Answers 4 12-06-2005 02:29 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-16-2002
Registered User
 

Join Date: Aug 2002
Location: Philadelphia, PA
Posts: 75
Prevent root login directly

Hi
How can I prevent anyone from logging in as root directly? I have added the line
console=/dev/null
to the file /etc/default/login

I was still able to login as root from the console. Please advice.

Thanks

Srini
Forum Sponsor
  #2 (permalink)  
Old 09-16-2002
Kelam_Magnus's Avatar
Unix does a body good.
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
Edit this file if present. You may need to create it first.

vi /etc/securetty

put "console and/or root" in here and any other user that you don't want logging in directly.

Here is a thread that discusses it as well.

Logging in and then su to root
__________________
My brain is your brain
  #3 (permalink)  
Old 09-16-2002
DPAI's Avatar
Registered User
 

Join Date: Jul 2001
Posts: 112
CONSOLE=-

I am not aware if it works for systems other than SSolaris
__________________
I haven't lost my mind....
Its backed up on tape somewhere
  #4 (permalink)  
Old 09-26-2002
Registered User
 

Join Date: Oct 2001
Location: Romania
Posts: 47
i'm sure that the thread starter is not using none of the bsd family variant, but i think useful to say that root login can be prevented [in all .BSD variants] editing /etc/ttys and removing "secure" attribute from all consoles where root login is not allowed. of course, /dev/console might be a good [even the only one] console for root login in single mode :-)
  #5 (permalink)  
Old 09-27-2002
Registered User
 

Join Date: Jun 2002
Posts: 60
Lightbulb

Hi,
I have done this through using the following:

I create a file in /etc called telnet_users where I list the name of all users that I want them to login directly to the system.
Then in /etc/profile I check if the user (through whoami) is in the telnet_users file if not I exit.

If u need the code I can provide it to u

Regards
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0