AvantGuard Computer and Security Systems has been operating since 2003, but was officially registered in 2005. ACSS's primary functions during this period has been as a repository of information related to computers for end-users and businesses. Over the years ACSS has garnered the trust of small businesses.
Also on this page: lsof cdrdao Create an image of a disk cdrecord Converting mp3 to wav Add a module Remove commented out lines
List Open Files
lsof (LM, Jan 2006)
Examples: who is using mplayer lsof 'which mplayer'
process ID using mplayer lsof -t 'which mplayer'
what files are being used by mplayer lsof -c mplayer
which files are being used by jeremy lsof -u jeremy files being used by others except jeremy lsof -u ^jeremy files being used by jeremy on /dev/hda7 lsof -u jeremy -a /dev/hda7
list of files open by process 123 lsof -p 123
what files are open in /tmp lsof +D /tmp
Internet sockets listening on port 25 lsof -i:25
who is connected to Google lsof -i@www. google.com
X11 Forwarding In order to permit X11 Forwarding, edit the X11Forwarding paramtere in the /etc/ssh/sshd_config file to yes.
VNC over SSH ssh -Nfl 5900:127.0.0.1:5900 user@remotehost Then point the VNC client to IP Address 127.0.0.1
Deny Users In order to prevent a user from being able to ssh into a server, you can add the username to DenyUsers parameter in the /etc/ssh/sshd_config file or use the AllowUser or AllowGroup parameters.
Enable passwordless ssh On the computer you will be ssh-ing from type: > ssh-keygen -t dsa (don't enter a password) Then, copy the created ~/.ssh/id_dsa.pub file to the server you wish to ssh into. > scp ~/.ssh/id_dsa.pub [server]:~
Now switch over the computer you will be ssh-ing into and type: > cat id_dsa.pub >> .ssh/authorized_keys
That should do it.
Track Your Stolen Computer
I have discovered a great idea in the latest issue of "The Hacker Quarterly". What it basically comes down to is this. You can put a script on your computer and schedule it to run on, say, a 5-minute basis. What the script does is merely access a webpage that one can set up strictly for this purpose. The webpage contains no data, but runs a script whenever accessed. When accessed from an IP address that it is has never been accessed from before, the script will then send a letter to a designated address that says: "Hey, I just got accessed by this IP address".
So let's say your computer got stolen and the thief goes home, or sells it, and the computer is booted up, and the person is able to get into it and he/she connects to the Internet. Well, voila! Unbeknown to him/her, the computer will connect to the web page and you will get a letter saying the computer is at such and such an IP address. Then, you could gather information about which Internet Provider that IP is registered through. Perhaps then the law enforcement agencies can get the Internet Provider to hand over information about the user of that IP address. The thief may be tracked down.
In the meantime, however, you could regain access to your computer. Grab any information/files that you need, delete any personal information, and then if you really wanted to, you could make sure that the new owner would have a hard time using the computer by deleting the entire system. Of course, the last option might only be used if you realize that the computer is lost forever.
Anyhow, if anyone is interested you can read the article in pdf format HERE .
I can also permit people to use the webserver I set up for this purpose, but I would first like to try to figure out if there is a way to configure it such that it would also grab a MAC address.
NB! There are a lot of reason why this would not work. For example, the thief immediately erases the HD and installs a new OS. So, please don't write me back telling me why this wouldn't work. There is the possibility that the script could and would work.
In order to add a module that was not installed:
Go to the kernel build locations (i.e., /usr/src/)
>make menuconfig choose module to add exit >make clean; make dep; make bzImage >make modules backup module directory >make modules_install
In order to see all available modules >depmod -a Install new module >modprobe [new module name]
In order to make module install on boot, add it to /etc/modules
In order to get kernel modules/parameters grep /boot/config-xxxx
To remove commented out lines and save to a new file:
cat old.file | grep -v "#" > new.file
Then to remove any blank lines, use vi and issue the following command:
:%s/^ {1}//
To merely view a file with all commented out text and blank lines removed: