LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-10-2006, 04:59 PM   #1
tealey@sgi.com
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Rep: Reputation: 0
Restricting Interactive Logins to server


Hi,

I would like to restrict normal users from any interactive logins to a server but since this is also a mail server I need to enable the users the ability to run services such as imap/pop. I would also like to "spit" out a message to the user if they attempt to login, informing them that the server does not allow logins. Any help would be appreciated. Thanks!!
 
Old 07-10-2006, 05:20 PM   #2
vls
Member
 
Registered: Jan 2005
Location: The grassy knoll
Distribution: Slackware,Debian
Posts: 192

Rep: Reputation: 31
/etc/login.access
I wouldn't bother with a message.
 
Old 07-10-2006, 06:34 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You can create a simple script like this.
Code:
#! /bin/bash -
echo "*********************************************************************"
echo "*                                                                   *"
echo "*                   Logins denied on this host                      *"
echo "*                                                                   *"
echo "*********************************************************************"
sleep 5
exit
Call it something like /usr/local/bin/nulLogin and make that the default shell for the users you want locked out, by entering it in /etc/passwd for each appropriate user.

eg:
Code:
test01:x:3456:3456::/home/test01:/usr/local/bin/nulLogin
--- rod.
 
Old 07-11-2006, 08:47 AM   #4
tealey@sgi.com
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Original Poster
Rep: Reputation: 0
More info on environment .....

Thanks for the suggestions so far but as for the bash suggestion ... I am in a NIS environment and users do access other systems interactively so I can not change their default shell. Also the server in question is running SuSe Enterprise Server 9.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restricting logins in a NIS environment fishsponge Linux - Networking 1 06-09-2005 08:52 AM
Restricting SSH logins. bullium Linux - Security 3 05-10-2005 01:15 AM
Restricting Bandwidth to FTP server Boffy Linux - Networking 1 08-27-2004 01:56 PM
POP3 and IMAP server logins gavinm Linux - Software 7 12-10-2003 12:06 PM
Logins main server... blither Linux - Networking 0 10-06-2003 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:54 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
Open Source Consulting | Domain Registration