Find the answer to your Linux question:
Results 1 to 3 of 3
hi! i'm completely new to linux so please be patient with me. my linux system doesn't have X only console login possible. i would like to deny all user to ...
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    1

    disable all user console login except root

    hi!

    i'm completely new to linux so please be patient with me. my linux system doesn't have X only console login possible. i would like to deny all user to login from any sources, local machine, remote console (putty, winscp) etc. except root.

    i've found something about /etc/security/access.conf and i've put:
    + : root : ALL
    - : ALL : ALL

    but still users other then root are able to login (via putty for example).

    can you help me with that please?

    thanks

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Smile

    create a file under /etc
    touch /etc/nologin
    or If you display some message to users

    echo "Go back -- its my machine " > /etc/nologin

    from man login

    If the user is not root, and if /etc/nologin exists, the contents of
    this file are printed to the screen, and the login is terminated. This
    is typically used to prevent logins when the system is being taken
    down.
    ps: I haven't tested this solution from putty or ssh clients

    HTH
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  3. #3
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    665
    you'll have to look it up more, but you could modify the /etc/pam.d/login so that if a user is on the console, but not root, then they are denied. I know it could be done, but it will require more research than I have time to help you with. sorry.
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...