Find the answer to your Linux question:
Results 1 to 5 of 5
Hello all, 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 I have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie Geeth's Avatar
    Join Date
    Apr 2008
    Location
    Brisbane Aus
    Posts
    176

    Bsd beginner


    Hello all,

    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

    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.

  2. #2
    Linux Newbie
    Join Date
    Apr 2005
    Location
    Clinton Township, MI
    Posts
    104
    Quote Originally Posted by Geeth View Post
    Hello all,

    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

    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.
    Brian Masinick
    masinick AT yahoo DOT com

  3. #3
    Linux Newbie Geeth's Avatar
    Join Date
    Apr 2008
    Location
    Brisbane Aus
    Posts
    176
    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.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Nov 2008
    Posts
    18
    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?

  6. #5
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    There's also 'slay' which should kill all the processes belonging to a user:

    freshmeat.net: Project details for Slay
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •