Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stoping a user... 2

Status
Not open for further replies.

sureshp

Programmer
Aug 28, 2000
79
0
0
I want to prevent a particular user from logging into my server.When I do a 'users' command I find him logged him.How do you eject him?
 
Do ps -ef | grep <user> then kill the process the user is logged in on.
To prevent the user logging in depends on your login system. If the user logs in locally, remove the user from the system. If you use NIS, its a bit more complex to block someone out.
 
If he's always coming in from the same ip (do the previous ps -ef command and then do a netstat -a to find out what ip he's on) you can put up a tcp wrapper to keep out that ip. There's a faq on how to do this over at Big Admin (sun administrators support page). HTH.

Mike
 
Well,

Why go through all the hassle yourself putting in the TCP Wrapper. Just open admintool or vi /etc/shadow and put in a NOLOGIN or change the password.

Unless for some reasons he can still connect to your box when you changed your password, then check your /.rhosts files and check the .ssh stuffs. Most of these are what they call Backdoor. They put these stuffs in so that they can still access your box even if you kill the process (PIDS)

Hope this help you my friend,

-David
 
are you running NIS? cos then you would have problems ... you could always change it so that the password files and shadows on your system are read before nis, and then change the users password ... that'd be the easiest way to stop a user ...
 
you could also change the log-in shell, in case his home directory is shared from another machine and he creates a .rhosts file to allow him to rlogin ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top