how to allow some users to only login on console?

how to allow some users to only login on console?

Post by sto » Sat, 09 Apr 1994 07:37:01



I know this is probably a faq and I've looked through tha man pages but
how can I restrict some accounts to be only allowed to login from the
console. I know that I can restrict root logins by changing which ttys
are "secure" but how can I do this for normal users?

thanks

-stos

 
 
 

how to allow some users to only login on console?

Post by Heiko Hero » Sat, 09 Apr 1994 22:05:37




>I know this is probably a faq and I've looked through tha man pages but
>how can I restrict some accounts to be only allowed to login from the
>console. I know that I can restrict root logins by changing which ttys
>are "secure" but how can I do this for normal users?

>thanks

>-stos

a simple way:

this is from my /etc/profile:

---------
trap "" 2 3

TTY=`/usr/bin/tty`
case $TTY in
        /dev/tty[0-9])  TERM=console ; LS=/usr/bin/ls ;;
                        #no color ls from the net;
        /dev/ttyS[0-4]) TERM=vt100 ; LS=/bin/ls ;;
        *)              if [ $LOGNAME = guest ] ; then
                          echo
                          echo "No guest login from remote."
                          sleep 5
                          exit 1
                        elif [ "$TERM" = "" ] ; then
                          TERM=vt100
                        fi

esac
unset TTY

trap 2 3
alias ls='$LS -F'
alias ll='$LS -lF'
alias la='$LS -aF'

--

 DON'T PANIC - The Hitch Hiker's Guide to the Galaxy            {itself}
 PANIC - The Hitch Hiker's Guide to the Galaxy MK II        {Mostly Harmless}
      (perceiving the Whole Sort of General Mish Mash)       [Douglas Adams]

 
 
 

how to allow some users to only login on console?

Post by J.S. van Oost » Fri, 15 Apr 1994 00:01:13



: >I know this is probably a faq and I've looked through tha man pages but
: >how can I restrict some accounts to be only allowed to login from the
: >console. I know that I can restrict root logins by changing which ttys
: >are "secure" but how can I do this for normal users?
: >
: >thanks
: >
: >-stos

: a simple way:

: this is from my /etc/profile:

[lost of script deleted]

How about /etc/porttime and enabling this from /etc/login.defs ? *grin*

[from /etc/login.defs]
#
# Enable checking of time restrictions specified in /etc/porttime.
#
PORTTIME_CHECKS_ENAB    yes

[/etc/porttime]
ttyS3:jvoosten:Al0000-2400
tty9,tty10,tty11:root:Al0000-2400
*:*:Al0000-2400

This one allows only me to login into my modem, root from the 9 to 11th
console, the rest on any console/line (except ttyS3) anytime. See the manual
page for porttime (section 4).

J. v. O.

--
Sometimes I wonder if this whole universe isn't anything more than a
simulation on a BIG computer. And they just might press Ctrl-C any time
now...
--
My PGP public key [version 2.3] (you know when, why and how...) :
mQCNAi1lYqsAAAEEAMCgUKS7DxyGF8D7QIGYXxRuh2n9Q2+5gIrrb1n9iOl4Xlgo
cO8Y3DE71J5K6WhlpEGDqXZIwY/Xx8mxq80ZHJ3n0pHOUxOQGdxxMT1mrKotjE4Y
wmGqnQhMhpcCKgT/5+5xhuMEluyGQqjyud3PCDogJCC/Sia7eO9+56e/13btAAUR
tC1KLlMuIHZhbiBPb3N0ZW4gPGp2b29zdGVuQGNvbXBpbGVyLnRkY25ldC5ubD4=
=3brb

 
 
 

1. how do I disable telnet login with certain user id, only allowing console login?

Hi All,

I have a user named "shutdown" which does  kill the xdm and shutting
down the system. As a default to RedHat distribution, login to root is
only allowed in console. I like to make "shutdown" like that. I mean
allowing only console login, not telnet login.

How do I do that?
could someone please help me out? Well, there is a passwd to shutdown so
it is not big deal.. but it will be nice to make it that way.

TIA

--
seung-hong sean oh                 ("`-''-/").___..--''"`-._        

 http://www.cis.ohio-state.edu/~oh  (_Y_.)'  ._   )  `._ `. ``-..-'
 http://seung-hong.ganet.net/      ..`--'_..-_/  /--'_.' ,'        
-- Linux RULES!!!                 (il),-''  (li),'  ((!.-'

2. Help Please! Need to reformat and reinstall everything?

3. NIS allows remote login but not console login?

4. Novell NDS for Solaris

5. sol2.6 - ttymon not allowing console logins

6. Tape backup programs...

7. How can I allow root login from telnet, not only console ?!

8. Prommaning with ftp

9. Telnet refused. Console login allowed (Not root)Why?

10. SCO v5 - Allow ROOT login on console only?

11. Allowing console users floppy / CD-ROM / sound access

12. Allowing a user to choose a group after login.

13. ftp doesn't allow user login; PAM problem?