1834644 Members
2377 Online
110069 Solutions
New Discussion

Re: traking for user

 
SOLVED
Go to solution
Mousa55
Super Advisor

traking for user

Hi
How to see all user working in my server
e.g i have two group dba and mysql
i want to see all user using my server.
and i can close the shell which work on it ?
thanks and best regards
9 REPLIES 9
Oviwan
Honored Contributor

Re: traking for user

you mean something like "who -u"?
Steven E. Protter
Exalted Contributor

Re: traking for user

Shalom,

who -u will work to provide a best guess of who is currently logged in. Its based on data in the /var/adm/wtmp file and is not always accurate.

I don't know what you mean by the statement "i can close the shell which work on it?"

You can kill any process on the machine as root, which has these priviledges.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: traking for user

If you don't trust who(1), you can look at all non-root processes:
$ ps -fe | grep -v "^root"
Mousa55
Super Advisor

Re: traking for user

Hi
the output of who -u command it is not out all user, if i am root the output only about the root user not another, if oracle and sql users using my server and i am root user how to see all these users and traking (last -oracle) and Expulsion from use the server
only.
thanks
Dennis Handly
Acclaimed Contributor

Re: traking for user

>if oracle and sql users using my server and i am root user how to see all these users

If you are looking for the users "sql" and "oracle", you can find them with:
$ ps -fu sql -u oracle

If you want to find ALL users that are using sql or an Oracle database, that is much harder.
Mousa55
Super Advisor

Re: traking for user

Hi
but remained how expulsion fro using the server.
namely only root user using the server.
thanks and best regards
Dennis Handly
Acclaimed Contributor
Solution

Re: traking for user

>but remained how expulsion from using the server. namely only root user using the server.

(There are some words missing above.)
Are you asking how to exclude everyone but root from using the machine?

I assume you don't want to go to single user mode?

You could use wall(1m) to ask them to logout.
Or you could kill them and then /etc/profile prevent them from logging in. You would also have to stop networking so rlogin, remsh, ssh don't work.

Here are some other threads that discuss this:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1070664
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=995109
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1138434
Mousa55
Super Advisor

Re: traking for user

thanks to all
Oviwan
Honored Contributor

Re: traking for user

I have assigned points to 1 of 185 responses to my questions. --> say thanks with hp points also in your other threads....