Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to restrick users other than root. And onces the user onces in it should appear a message saying USERS NOT ALLOWED !!! something like this..... thought PAM .. i hv restrick the users expect root ... the problem is messages are not appearing when the users try to login. can somebody help me with this .... need it Urgently.... awainting for ur valueable response.
I haven't actually used it, but you might want to give it a try.
touch /etc/nologin
and make sure you can login as root before you actually signoff of your current session.
You will probably want to verify that other IDs cannot signon.
I don't know how this effects ftp etc...
Depending on what your goal is here, you may just want to go into single user mode by: init 1
That should restrict all logins except from the console. Other services will be
shutoff too ( ftp, ssh, oracle, etc.... ).
/etc/motd is a file that shows a message when signing on.
Oh... Don't forget to rm /etc/nologin when you done! :-)
SSH will display a banner before a user signs in.
I think wu-ftpd will also.... hmmm.... maybe not.
As for telnet, you might have to research that one.
The point being, there isn't one single place you can
place a message that affects logins for all of these
different services.
SSH and Telnet both use /etc/profile. You could place
a message in there and then boot the user out. Make
sure that there is some if...then logic to allow root to
login though.
Ftp doesn't use /etc/profile so you'd have to find a
different mechanism for it. ( or maybe just turn it off ).
I has restricted users through pam ... i was able to restrict users the only problem i was facing ... when users try to login via telnet messages was not appearing .... so i created a nologin file in /etc.
In nologin file i typed Unauthorised Users Probhited. thatz hw i use to get the message when users try to login.
So it appears that /etc/nologin does affect telnet with a message.
SSH would require it's own banner setup. ( it supports it ). It'll actually display the message before the user attempts logging in.
I'm not quite sure about ftp and wu-ftpd.
But anyway.... It'll looks like you've solved your problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.