Parsing the command line in BASH

Bash is a shell, but it’s also a scripting language. You can make bash scripts, and you can pass parameters to it. You can access the parameters with $1, $2, … But what if you need the whole command line? Bash uses special variables for all kind of purposes. One of them is $* which … Read more

Domains to search in

When you try to access a Web site, or any remote site, you need to specify the full hostname. This means the machine name plus the domain name: lynx my.yahoo.com If you have a few domain names that you access a lot, you can make your life easier. You can edit /etc/resolv.conf and add the … Read more

Internet for your LAN

Internet for your LAN Many companies have local networks, and it is becoming even more popular in homes, where 2 or 3 systems are linked together using ethernet wires. Most providers only offer 1 IP address per connection, which means that you can’t put all of the systems on the Internet at the same time, … Read more

Mouting windows shares without Samba

To mount a window share you need not configure Samba for that Just check out that you have smbmount utility installed with smbclient -L you can see the list of shares from windows machines and to mount that use smbmount ‘share path’ regards

know more about your network

Ever tried to know more about your networtk like what is your network address and your default gateway and routing rules etc try ifconfig and route -n to know abou your DNS server ,check the file /etc/resolv.conf

Gain of performance for harddisk by using 32bits transfers

Gain of performance for harddisk by using 32bits transfers

adding the line

hdparm -c3 /dev/hdX

to a bootup script. For SuSE and probably other SYS V based systems
/sbin/init.d/boot.local works fine.
This enable 32 bit X-fer for you harddisk. On some systems it boost xfer
performance by 75%.
To test how much you gained type:

hdparm -t -T /dev/hdX

from http://www.patoche.org/

Read more

locally checks for signs of a rootkit

Rootkits are used by intruders to hide and secure their presence on your system. An intruder achieves complete cloaking capability by relying on an administrator to trust the output of various system programs. This assumption is more or less true — most of the time system administrators trust ps to display all processes and ls … Read more

Allowing users to run root programs

When a user starts a command, it runs with the permissions of that
user. What if you want to allow them to run some commands with root
permissions? You can, and that’s called suid.You can set a command to
be suid root with the chmod command. This will make it run as root even
if a user starts it. Here is how to set mybin suid root:

chmod +s mybin

Note that you must be very careful with this option.

Read more