473,385 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

login surveillance program

1
I am working on a program (in Python) which should display, every time a user connects to the system, a list of all logged users and the number of their active processes. Now I'd know (more or less) how to write this program in Shell, using such commands as "who" and "ps -u", but are there similar methods I could use in Python? And where should I actually look to inquire when a new user logs in? (I aren't allowed to access /var/log/wtmp)

Thanks a lot,
Adnana
Nov 3 '08 #1
2 1369
Fabez
29
Python has a system function that will let you provide a command as a parameter and it will execute it as if you had typed it at the shell. If you have already made the utility in the shell, then you can just wrap all of your commands in the system function of Python.
Nov 3 '08 #2
Curtis Rutland
3,256 Expert 2GB
I have some suspicions about this question. If you aren't allowed into that file, then why do you need to track logins, or are you authorized to?

Please note our policy from the Posting Guidelines
Posts containing any information or questions on how to hack or crack or produce code with some other malicious intent.
I'm not accusing you of anything, for the record. So if you would explain this app further, and it is legitimate, we can help you further. We would just like to avoid helping any illegal/unethical programs.
Nov 4 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Anto | last post by:
Hello, I'm italian programmer I would have to realize a video program surveillance for cellular and I do not know just from where to begin. Someone has a po' of experience in merit? Practically...
0
by: Mr.KisS | last post by:
Hello. I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005 Express. When i try to open a connexion with : <connectionStrings> <add name="AppCnxStr"...
2
by: Mr.KisS | last post by:
Hello. I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005 Express. When i try to open a connexion with : <connectionStrings> <add name="AppCnxStr"...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
3
by: lagu2653 via DotNetMonster.com | last post by:
I have a log-in window application. When the user presses the cancel button it kills another window by it's name and then it exits. The problem is that if somebody kills the log-in window by...
2
by: paeh | last post by:
Can any expert help me. I need to finish up my final project system next year. Can anyone give me some idea how to code my system. My system details is below : 1.Develop modules for a...
0
by: Rambaldi | last post by:
Hey people, I'm working in a project in video surveillance area, so i got a question: Which video surveillance open-source platforms do you know??? and what do think is the best to work with???...
1
by: Rambaldi | last post by:
What is the best free application to manage a video surveillance system in linux? I'm making a project in video surveillance systems and i'm currently researching for free aplications for linux...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.