Thanks. Hehe, that worked! Hmm...why didn't I think of that.
I've added stuff to your command. You can use:

ps ax|grep ftpd|grep -v grep|awk '{print$1" "$7}'

to view the seventh argument of the line which is the username and will
output something like:

454 [EMAIL PROTECTED]:
469 carlo:

where carlo is a non-anonymus user.
To kill all of carlo's ftp connections:

kill -9 `ps ax|grep ftpd|grep -v grep|grep carlo|awk '{print$1}'

Although grep is executed 3 times...any way to shorten this? Will this work
in a bash script? Dunno how it will handle argument variables, will awk
conflict with he script's $x variables?

> > How do I see and disconnect users logged in on wuftpd? I
> > don't mean denying
> > them based on hosts.allow/deny or by IP add, I mean
> > disconnecting *currently
> > logged on* users.
> >
>
> Wala akong alam na matinong way. :-)
>
> This command will kill all logged users in ftpd.
>
> kill -9 `ps ax | grep ftpd | grep -v grep | awk '{print$1}'`
>
> You can also supply another pattern for grep which includes the username.
> Exercise iyon. :-)
>
> onie
>


_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to