LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-01-2004, 04:22 AM   #1
ust
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, 07:11 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

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

Code:
-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:

Code:
-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, 12:06 PM   #3
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: CentOS, MacOS, [Open]SuSE, Raspian, Red Hat, Slackware, Solaris, Tru64
Posts: 1,232

Rep: Reputation: 80
Re: disable user login

Quote:
... 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.,
Code:
cat > /etc/nologin

Sorry but the system is undergoing maintenance at this time.

Try back later.

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

Hope this helps...
 
  


Reply


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 04:51 AM
disable login juno Linux - General 1 10-25-2002 05:50 AM
disable login over internet keevitaja Linux - Newbie 5 08-20-2002 05:43 PM
auto login ~ how to disable? thinguy10 Linux - General 3 02-04-2002 05:34 AM
How to disable XWindow Login sarmadys Linux - General 3 12-06-2001 09:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:07 PM.

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