Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
watching users?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Mon Dec 27, 2004 8:47 am    Post subject: watching users? Reply with quote

i provide shell accounts on my network to lots of friends.
lately some of them have been getting me in trouble.
what's the best way to watch what users have been up to? limit bandwidth? and especially limit nmap scanning (but not totally disable it)

and what should i use to sync user accounts, short of installing LDAP or sharing /etc/passwd,shadow,and group over NFS?

basically, i want to see what certain users have been up to, exactly, in the last few hours.
suggestions?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20588

PostPosted: Mon Dec 27, 2004 8:47 am    Post subject: Re: watching users? Reply with quote

MADcow wrote:
i provide shell accounts on my network to lots of friends.
lately some of them have been getting me in trouble.
If they are truly friends, they wouldn't be doing stuff to get you in trouble. If they are/when they do, then simply stop providing them access.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Mon Dec 27, 2004 8:59 am    Post subject: Reply with quote

yes. that's what i figured when i started giving out shell accounts, and what i've been doing.
but when they piss off my ISP (like what happened last month), closing their account is too late to prevent the damage.
if i could watch then more effectively, and suspend accounts BEFORE it gets out of control, i would be much more satisfied.
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Mon Dec 27, 2004 10:29 am    Post subject: Reply with quote

You can always snoop their bash history .
Back to top
View user's profile Send private message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Mon Dec 27, 2004 9:11 pm    Post subject: Reply with quote

some people have taken to unsetting it.
not to mention that it's unreliable because they can edit or delete it.
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Mon Dec 27, 2004 9:19 pm    Post subject: Reply with quote

So create a script that saves a users history at a certain interval while the user is logged in. Don't have it overwrite other files, have it create a new file name with each save.

I dunno, just throwing ideas out.
Back to top
View user's profile Send private message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Mon Dec 27, 2004 9:26 pm    Post subject: Reply with quote

they could still unset it.
unset $HISTFILE

and then nothing is echoed to history.
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Mon Dec 27, 2004 9:42 pm    Post subject: Reply with quote

MADcow wrote:
they could still unset it.
unset $HISTFILE

and then nothing is echoed to history.


Oh. Shows what I know.. hehe. =)

That can't be disabled?
Back to top
View user's profile Send private message
MADcow
l33t
l33t


Joined: 23 Jan 2003
Posts: 742
Location: RIT (Henrietta, New York, United States)

PostPosted: Mon Dec 27, 2004 9:44 pm    Post subject: Reply with quote

i don't see how. $HISTFILE is an env variable. the user owns it, so they can do whatever they want with it. all they're doing is setting it to nothing so that no file is used.
Back to top
View user's profile Send private message
dewke
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jun 2004
Posts: 77
Location: The sunshine state

PostPosted: Tue Dec 28, 2004 12:12 am    Post subject: Reply with quote

First I would change the permissions on nmap, or any other "questionable" application so that non root users cannot execute it. Do not allow non root users to compile code. Tell your "friends" to quit it. If they still are getting you in trouble, well then they aren't your friends are they?

You could write a shell script to run ps and log the results every x minutes. You might not catch everything, but you would see any long term annoying commands.
_________________
Oderint dum metuant
-Caligula
Back to top
View user's profile Send private message
Tazok
Guru
Guru


Joined: 25 Oct 2003
Posts: 310

PostPosted: Tue Dec 28, 2004 1:32 am    Post subject: Reply with quote

You could set up process accounting. This way you know exactly which programs they were running, for how long, and how much cpu-time they have consumed.
Code:
 emerge acct
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum