Tuesday, January 29, 2008


iMilk using your iPhone

Saturday, January 19, 2008

A Samba configuration file that works

workgroup = Workgroup
netbios name = SAMBA
server string = Samba Server
security = SHARE
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
hosts allow = all
printing = lprng
preferred master = yes


comment = Home Directories
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No


comment = All Printers
path = /var/spool/samba
printable = Yes
guest ok = Yes
browseable = No
public = yes


path = /tmp
read only = No
guest ok = Yes
create mask = 0664
directory mask = 0775

comment = storage
writeable = yes
public = yes
path = /storage

Thursday, January 17, 2008

How to configure linux networking / Internet

Note: You MUST be at the ROOT user to make/save any changes. Linux users, your distribution will determine the location of your network config file which will need to be updated and saved in order for the changes to remain in effect after rebooting. Network cards are referred to as eth0, eth1, eth2, etc based on their position on the PCI bus.

Display Current Config for all NIC's: ifconfig
Display Current Config for eth0: ifconfig eth0
Assign IP: ifconfig eth0
Assign IP/Subnet: ifconfig eth0 netmask
Assign Default Gateway: route add default gw
Assign multiple IP's: ifconfig eth0:0
Assign second IP: ifconfig eth0:1
Disable network card: ifconfig eth0 down
Enable network card: ifconfig eth0 up

View current routing table: route "or" route -n
View arp cache: arp "or" arp -n
Ping: ping -c 3
Trace Route: traceroute www.myroorkee.com
Trace Path: tracepath www.myroorkee.com
DNS Test: host www.myroorkee.com
Advanced DNS Test: dig www.myroorkee.com
Reverse Lookup: host
Advanced Reverse Lookup: dig -x

Nobody will ever need more than 640k RAM !

"Nobody will ever need more than 640k RAM!"
-- Bill Gates, 1981
"Windows 95 needs at least 8 MB RAM."
-- Bill Gates, 1996
"Nobody will ever need Windows 95."

-- logical conclusion

Thursday, January 3, 2008

How to add a new hard disk to Linux

Yesterday night I was planning to add a new hard drive to my Linux machine ( Ubuntu ), I thought it would be a difficult task, but to my surprise it was almost like a walk in the park.
here are the simple steps that made me through.
  1. Physically added the new hard drive ( Not yet partitioned )
  2. ls /dev/sd*
    1. This will give you a list of devices, you should be able to identify the device which you have recently added, it was easy for me as I saw something like this
    2. /dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sdb
    3. As /dev/sda seems to be portioned /dev/sdb is the new hard drive.
  3. Partition the new hard disk
    1. cfdisk /dev/sdb
    2. I created just 1 partition, you may have your own preferences.
  4. Format the partition
    1. mkfs -t ext3 /dev/sdb1
  5. Configure the system so as to auto mount the drive ever time you boot the system.
    1. Edit the /etc/fstab file
      1. vi /etc/fstab
    2. add the following line
      1. /dev/sdb1 /storage ext3 defaults 1 2
  6. Just to check if the file was correctly edited, type "mount -a" if no error is shown you are done.
  7. no need to reboot you new hard disk is accessible through /storage