book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!







This article is from a FAQ concerning SCO operating systems. While some of the information may be applicable to any OS, or any Unix or Linux OS, it may be specific to SCO Xenix, Open Desktop or Openserver.

There is lots of Linux, Mac OS X and general Unix info elsewhere on this site: Search this site is the best way to find anything.

Unix, Xenix and ODT General FAQ

How can I prevent root logins over telnet?

First, you can limit root logins to a specific device by adding an entry to /etc/default/login:


 CONSOLE=/dev/tty01


Hate these ads?


 


restricts root to the ALT-F1 multiscreen only. Unfortunately, there doesn't seem to be any way to add more than one device with CONSOLE, so that locks root out of tty02 and all the rest.

Less secure, but still useful, is to test within /etc/profile to boot root out of any but the multiscreens. Code to do that might look like:



 IAM=`who am i | cut -d" " -f1`
 TTY=`tty`
 if [ $IAM = "root" ]
 then
  case $TTY in
   /dev/tty[0-1][0-9]) : ;;
   *) exit 0;;
   esac
 fi


 







But this simplistic approach can cause problems with single user mode login. To avoid that, you need something that uses "who -r" to test the run-level and avoid the other tests if it isn't multiuser.

The 5.0.6 release adds a REMOTE_ROOT_OK keyword that can be used in /etc/default/login that *will* allow network access while when CONSOLE is set! See "man login" (5.0.6).





Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


Views for this page
Today This Week This Month This Year  Overall
9253434 2,981

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

pavatar.jpg
More:




Unix/Linux Consultants


http://www.breakthru.com.au SCO (Openserver and Unixware), Unix, Solaris and Linux Consulting services including: Secure Networking Solutions; Linux based Firewalls; Backup Solutions; Secure Home to Office Network Setup; Phone, Remote and On-Site Support available - Satisfaction Guaranteed!


http://www.cleverminds.net Need expert advice? Want a second opinion? CleverMinds is a one-stop-shop for a wide range of technology solutions. We support Unix, Linux, SCO as well as CMS, ecom, blogs, podcasts, search engines consulting and more. Contact us at web2.0@cleverminds.net 0r (617) 894-1282


larryi@ccamedical.com SCO OS5, Debian Linux, RedHat Linux, MySQL, Apache, AJAX development using dXport/dL4/Unibasic, Windows Connectivity, Sharing Resouces, Automation, Shell Scripting



Twitter
o My wife's computer is a constant problem. It's Windows XP - so what did I expect? Reboot, reboot, reboot.. someday I'll get her off that !# 5:34 AM Apr 12th 2008








Change Congress