Linux - Security This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
10-16-2005, 10:33 PM
|
#1
|
Member
Registered: Dec 2004
Location: Bangalore, India
Distribution: Fedora 2
Posts: 74
Rep:
|
How to Block User Login
Hi all,
How to temporirly block a particular user from login.
What is the command ?
Thanks in advance
|
|
|
10-16-2005, 10:47 PM
|
#2
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
Hi.
'usermod -s /sbin/nologin username' will lock the user out.
'usermod -s /bin/bash username' will let them back in.
Dave
|
|
|
10-16-2005, 11:19 PM
|
#3
|
Member
Registered: Dec 2004
Location: Bangalore, India
Distribution: Fedora 2
Posts: 74
Original Poster
Rep:
|
Hi i be able to lock the user. by giving 1'st Command.
but i cant login again after giving the second command for particular user..
Its saying access denied.. whats wrong
Command 1 : $ usermod -s /sbin/nologin aeiou
now account blocked
command 2 : $usermod -s /sbin/bash aeiou
when i try to login after giving 2 nd command it saying access denied...
reply me soon
|
|
|
10-16-2005, 11:23 PM
|
#4
|
Member
Registered: Dec 2004
Location: Bangalore, India
Distribution: Fedora 2
Posts: 74
Original Poster
Rep:
|
i found it ...
command 2 : $usermod -s /sbin/bash aeiou
^^^
It is /bin/bash...
Thanks a lot ..
|
|
|
12-10-2005, 06:15 AM
|
#5
|
Member
Registered: Aug 2005
Distribution: Debian
Posts: 355
Rep:
|
does this stop them accessing your emails also?
what about just stopping people login using ssh?
|
|
|
12-10-2005, 11:49 AM
|
#6
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
Most POP3/IMAP servers allow a user with /sbin/nologin to get their mail (since you don't actually need a login shell to download mail). If you just want to block SSH access but leave console access intact, you can use the DenyUsers directive in /etc/ssh/sshd_config . Note that you must restart sshd after modifying this file.
|
|
|
12-19-2005, 09:00 AM
|
#7
|
Member
Registered: Aug 2005
Distribution: Debian
Posts: 355
Rep:
|
I am installed web-min with ssh and it works perfect just bloked everyone except me
|
|
|
All times are GMT -5. The time now is 10:04 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|