keeping root from logging in

keeping root from logging in

Post by jfinc.. » Tue, 28 Mar 2000 04:00:00



I want to keep root from logging in both locally and through ssh.  I tried
changing root's shell to /bin/false, but that kept me from using su, which
I want still enabled.  How can I keep root from logging in, but still allow
su access (which on my box is restricted to users in group "wheel").

Thanks,
Jeremy

 
 
 

keeping root from logging in

Post by Tom East » Tue, 28 Mar 2000 04:00:00


Jeremy,


>I want to keep root from logging in both locally and through ssh.  I tried
>changing root's shell to /bin/false, but that kept me from using su, which
>I want still enabled.  How can I keep root from logging in, but still allow
>su access (which on my box is restricted to users in group "wheel").

Make /etc/securetty an empty file.

-Tom
--
Tom Eastep             \  Eastep's First Principle of Computing:
ICQ #60745924           \  "Any sane computer will tell you how it

Shoreline, Washington USA \___________________________________________

 
 
 

keeping root from logging in

Post by Martijn Kruitho » Tue, 28 Mar 2000 04:00:00



> I want to keep root from logging in both locally and through ssh.  I tried
> changing root's shell to /bin/false, but that kept me from using su, which
> I want still enabled.  How can I keep root from logging in, but still allow
> su access (which on my box is restricted to users in group "wheel").

> Thanks,
> Jeremy

modify your /etc/securetty

Kind regards, Martijn
--
http://jkf.penguinpowered.com
Linux distributies voor maar
Fl 10 per CD, inclusief verzendkosten!

 
 
 

keeping root from logging in

Post by Tim Hayne » Tue, 28 Mar 2000 04:00:00



> Jeremy,


> >I want to keep root from logging in both locally and through ssh.  I
> >tried changing root's shell to /bin/false, but that kept me from using
> >su, which I want still enabled.  How can I keep root from logging in,
> >but still allow su access (which on my box is restricted to users in
> >group "wheel").

> Make /etc/securetty an empty file.

One other thing as well? : /etc/sshd_config, PermitRootLogin=No

Just an idea :)

~Tim
--
| Geek Code: GCS dpu s-:+ a-- C++++ UBLUAVHSC++++ P+++ L++ E--- W+++(--) N++
| w--- O- M-- V-- PS PGP++ t--- X+(-) b D+ G e++(*) h++(*) r--- y-          
| The sun is melting over the hills,         | http://piglet.is.dreaming.org/

 
 
 

keeping root from logging in

Post by David Gilla » Wed, 29 Mar 2000 04:00:00


Ummm....a small question here?  What if you have to go to Single-User
mode?  You can *only* use root's account to get in to correct some
severe problems.  Will that still work when you've got it setup so root
cannot login (even on the console)?

Thanks in advance for an answer....



> > Jeremy,


> > >I want to keep root from logging in both locally and through ssh.  I
> > >tried changing root's shell to /bin/false, but that kept me from using
> > >su, which I want still enabled.  How can I keep root from logging in,
> > >but still allow su access (which on my box is restricted to users in
> > >group "wheel").

> > Make /etc/securetty an empty file.

> One other thing as well? : /etc/sshd_config, PermitRootLogin=No

> Just an idea :)

> ~Tim
> --
> | Geek Code: GCS dpu s-:+ a-- C++++ UBLUAVHSC++++ P+++ L++ E--- W+++(--) N++
> | w--- O- M-- V-- PS PGP++ t--- X+(-) b D+ G e++(*) h++(*) r--- y-
> | The sun is melting over the hills,         | http://piglet.is.dreaming.org/


--

    _/_/_/_/   _/_/_/_/                 David Gillam
   _/     _/  _/                      
  _/      _/ _/   _/_/        
 _/     _/  _/     _/                       USA
_/_/_/_/   _/_/_/_/                 Fax - 01-208-246-3867

 
 
 

keeping root from logging in

Post by Tom East » Wed, 29 Mar 2000 04:00:00



>Ummm....a small question here?  What if you have to go to Single-User
>mode?  You can *only* use root's account to get in to correct some
>severe problems.  Will that still work when you've got it setup so root
>cannot login (even on the console)?

You still have single-user mode which bypasses /etc/securetty...

-Tom
--
Tom Eastep             \  Eastep's First Principle of Computing:
ICQ #60745924           \  "Any sane computer will tell you how it

Shoreline, Washington USA \___________________________________________

 
 
 

keeping root from logging in

Post by David Gilla » Wed, 29 Mar 2000 04:00:00




> >Ummm....a small question here?  What if you have to go to Single-User
> >mode?  You can *only* use root's account to get in to correct some
> >severe problems.  Will that still work when you've got it setup so root
> >cannot login (even on the console)?

> You still have single-user mode which bypasses /etc/securetty...

> -Tom
> --
> Tom Eastep             \  Eastep's First Principle of Computing:
> ICQ #60745924           \  "Any sane computer will tell you how it

> Shoreline, Washington USA \___________________________________________

Well, *that's* good to know!  :-)  Thanks!
--

    _/_/_/_/   _/_/_/_/                 David Gillam
   _/     _/  _/                      
  _/      _/ _/   _/_/        
 _/     _/  _/     _/                       USA
_/_/_/_/   _/_/_/_/                Fax - 01-208-246-3867

 
 
 

keeping root from logging in

Post by Bill » Wed, 29 Mar 2000 04:00:00


On Mon, 27 Mar 2000 17:17:16 GMT, Mara allowed

Quote:>I want to keep root from logging in both locally and through ssh.  I tried
>changing root's shell to /bin/false, but that kept me from using su, which
>I want still enabled.  How can I keep root from logging in, but still allow
>su access (which on my box is restricted to users in group "wheel").

Others answered the question as well as I could.

Just one question : why not over SSH?  SSH is reasonably secure, isn't it?

Bill "Houdini" Weiss
---
Robert the high speed hacker, had a very high-speed switch,
and if you ever saw it, you would see the fibre twitch.
All of the other admins, used to cry and curse his name,
they never let poor Robert, play in any high-speed games.
Then one foggy weekend night, San Cisco came to say,
Robert with your ports so tight, won't you link my sites tonight?
Then all the admins loved him, they thought it would be real neat,
If Robert the high-speed-hacker, would teach them to be 3L1T3.
        mike, comp.os.linux.security

 
 
 

keeping root from logging in

Post by jfinc.. » Wed, 29 Mar 2000 04:00:00



>Ummm....a small question here?  What if you have to go to Single-User
>mode?  You can *only* use root's account to get in to correct some
>severe problems.  Will that still work when you've got it setup so root
>cannot login (even on the console)?

>Thanks in advance for an answer....

It just adds an extra layer of security.  Without allowing root to log in
locally or by ssh, not only does a hacker have to know the root password,
but he also must know a password of a member of group "wheel".

The reason for not allowing logins locally for root is that my computer isn't
entirely physically secure.  However, the people who might be around it aren't
so bold as to reboot into single user mode; however, they might be so bold as
to log in as root given the oppurtunity.  This makes it that much harder for
them to do so.

And I can always su root.

Jeremy

 
 
 

keeping root from logging in

Post by jfinc.. » Wed, 29 Mar 2000 04:00:00




Quote:>Just one question : why not over SSH?  SSH is reasonably secure, isn't it?

Reasonably secure, yes.  However, since I don't want to restrict which computer
can ssh into my box (being all over the place) I'd rather not allow anyone and
everyone to attempt to log in as root over ssh.  

And I'll always have su.

Jeremy

 
 
 

keeping root from logging in

Post by Tim Hayne » Wed, 29 Mar 2000 04:00:00





> >Just one question : why not over SSH?  SSH is reasonably secure, isn't
> >it?

> Reasonably secure, yes.  However, since I don't want to restrict which
> computer can ssh into my box (being all over the place) I'd rather not
> allow anyone and everyone to attempt to log in as root over ssh.

> And I'll always have su.

Hint. Might you find sudo useful as well? In terms of allowing who can do
what from where... and the root password doesn't have to go /anywhere/ at
all that way.

(Personally I think that sudo-versus-su is a bit like .rhosts - it cuts
BOTH ways, if you use it then you can set up accounts that give you root
instantly, if you don't then you have to let the root password through
somewhere. Oops.)

~Tim
--
| Geek Code: GCS dpu s-:+ a-- C++++ UBLUAVHSC++++ P+++ L++ E--- W+++(--) N++
| w--- O- M-- V-- PS PGP++ t--- X+(-) b D+ G e++(*) h++(*) r--- y-          
| The sun is melting over the hills,         | http://piglet.is.dreaming.org/

 
 
 

keeping root from logging in

Post by Tim Hayne » Wed, 29 Mar 2000 04:00:00





> > >Ummm....a small question here?  What if you have to go to Single-User
> > >mode?  You can *only* use root's account to get in to correct some
> > >severe problems.  Will that still work when you've got it setup so root
> > >cannot login (even on the console)?

> > You still have single-user mode which bypasses /etc/securetty...

> Well, *that's* good to know!  :-)  Thanks!

Indeedie - there's su & telinit s, or reboot and use "single init=/bin/sh"
on the lilo commandline....

~Tim
--
| Geek Code: GCS dpu s-:+ a-- C++++ UBLUAVHSC++++ P+++ L++ E--- W+++(--) N++
| w--- O- M-- V-- PS PGP++ t--- X+(-) b D+ G e++(*) h++(*) r--- y-          
| The sun is melting over the hills,         | http://piglet.is.dreaming.org/

 
 
 

1. Need HELP to Log User Log-ins form the internet

Hi,

I've setup a FreeBSD 4.1.1-STABLE box to connect a network to the internet
with natd and ipfw firewall.
I've also setup the FreeBSD box to let teleworkers log in with FTP and
telnet.

Now I would like to log FTP and telnet Log-in's from teleworkers who connect
to the machine from the internet.
I woul like to see the time and IP numer from which users Log-in.

I have looked at the /var/log/messages file but this only shows SU Login's.

All help is greatly appriciated!

Luke

2. Ytalk: no talk daemon

3. Prevent ROOT using logging on as ROOT

4. korganizer - in development still?

5. PPP error when only su to root; OK if logged in as root

6. Sony CDU-33A = =CDU-31A?

7. Can't log in as root, but can su root

8. Upgrading to 3.2-Stable

9. Keep log of history commands

10. Keep a program running after logging out

11. SUMMARY: How to keep users from logging in

12. login sessions keep on using CPU power after being logged out.

13. How do I keep a log of every command each user issues?