I have just setup a bsd file server a few weeks ago for the simple reason that i had a spare pc and don't know bsd :p
I have an account called test, have I have a friend remote log in so I can test permissions etc through ssh.
There is one thing that I haven't been able to work out and it's bugging me. How can you kick a user offline?
If he's theres a user connected to a bsd server, besides deleting the account (which is the only way i have kicked the session) how can you kick someone.
When I lock the account / expire the account it stays online and he can still change dirs etc.
The connection is through ssh.
If you are familiar with either UNIX or Linux conventions regarding users and processes, you can locate the user (using who) and you can use ps to find the processes that are on the system. As the root user, you can use kill -9 followed by the process number of any process reported by the ps command - ps -al will give you a long listing of all processes. You can use ps -al | grep <user-account> to find the specific processes that concern you, then kill the ones you want to get rid of. That will knock any process out. Just be sure it is the right one, which is why I included the "who" command in the discussion.
Originally Posted by Geeth
Thanks heaps for that.
I spent quite some time googleing and all i came across was how to kick all all but super users.
I will play with that tonight.
That will stop the processes, but not prevent them from logging in again and starting a new session. Is that what you wanted to do? Just stop their current session and allow them to connect again?
There's also 'slay' which should kill all the processes belonging to a user:
freshmeat.net: Project details for Slay