Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-01-2004, 05:22 AM   #1
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
disable user login

our users use telnet to access our linux system , how to temporaily disable user login and only accept system administrator to telnet to the system ? thx
Old 04-01-2004, 08:11 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 252Reputation: 252Reputation: 252
man pages are so ineffective aren't they.... I manned usermod and found this:

-L     Lock  a user's password.   -   This puts a '!' in front of the encrypted password, effectively disabling the pass-word.  You can't use this option with -p or -U.

-U     Unlock a user's password.   -  This removes the '!' in front of the  encrypted  password.   You  can't  use  this option with -p or -L.
or you can probably use this option as well:

-e expire_date   -  The date on which the user account will be disabled.  The date is specified in the format YYYY-MM-DD.
And why are you using telnet, its old, outdated, unencrypted and so on.. use ssh, its safer and good security practice. And I would especially disable root access thru telnet, bad idea. Anyone could grab that password with ease and easily exploit your server.
Old 04-01-2004, 01:06 PM   #3
Senior Member
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: CentOS, MacOS, [Open]SuSE, Raspian, Red Hat, Slackware, Solaris, Tru64
Posts: 1,254

Rep: Reputation: 91
Re: disable user login

... how to temporaily disable user login and only accept system administrator to telnet to the system ?
Check into the man page for "login" and see if that'll do the trick. If you create the file "/etc/nologin", i.e.,
cat > /etc/nologin

Sorry but the system is undergoing maintenance at this time.

Try back later.

The Management
users attempting to login will be presented with that message and not be allowed to login.

Hope this helps...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable *any* remote login? lmmix Linux - Security 3 03-07-2005 05:51 AM
disable login juno Linux - General 1 10-25-2002 06:50 AM
disable login over internet keevitaja Linux - Newbie 5 08-20-2002 06:43 PM
auto login ~ how to disable? thinguy10 Linux - General 3 02-04-2002 06:34 AM
How to disable XWindow Login sarmadys Linux - General 3 12-06-2001 10:33 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration