Wednesday, November 12, 2008

SNMPwalk commands

snmpwalk -v 1|2c|3 -c public IP

example:

snmpwalk -v 2c -c public 127.0.0.1
or
snmpwalk -v 1 -c public 127.0.0.1
or
snmpwalk -v 3 -c public 127.0.0.1

Sunday, November 2, 2008

Dual Monitor Config with NVidia and Ubuntu

To get dual monitors working under Ubuntu with NVidia drivers make the following changes to your xorg.conf file

Under the heading of "Screen" add the following:
Option "TwinView"
Option "1280X1024 280X1024"

Save this and restart X.

You will not have 2 monitors.

http://www.ubuntugeek.com/dual-monitors-with-nvidia.html

Sample xorg.conf after change:

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
Option "TwinView"
Option "1280X1024 1280X1024"
EndSection

Monday, October 27, 2008

Command line Kung-Fu

Great list of windows command line options
http://synjunkie.blogspot.com/2008/03/basic-dos-foo.html

Sunday, August 3, 2008

Update firefox on Ubuntu

run the following command to enable the " check for updates" option under help:

$ gksudo firefox

Now you can update firefox under Ubuntu.

Thursday, July 31, 2008

Public Free DNS servers

Thanks to http://www.tech-faq.com/public-dns-servers.shtml

Public DNS Servers

Level 3 Communications (Broomfield, CO, US)

4.2.2.1
4.2.2.2
4.2.2.3
4.2.2.4
4.2.2.5
4.2.2.6

Verizon (Reston, VA, US)

151.197.0.38
151.197.0.39
151.202.0.84
151.202.0.85
151.202.0.85
151.203.0.84
151.203.0.85
199.45.32.37
199.45.32.38
199.45.32.40
199.45.32.43

GTE (Irving, TX, US)

192.76.85.133
206.124.64.1

One Connect IP (Albuquerque, NM, US)

67.138.54.100

OpenDNS (San Francisco, CA, US)

208.67.222.222
208.67.220.220

Exetel (Sydney, AU)

220.233.167.31

VRx Network Services (New York, NY, US)

199.166.31.3

SpeakEasy (Seattle, WA, US)

66.93.87.2
216.231.41.2
216.254.95.2
64.81.45.2
64.81.111.2
64.81.127.2
64.81.79.2
64.81.159.2
66.92.64.2
66.92.224.2
66.92.159.2
64.81.79.2
64.81.159.2
64.81.127.2
64.81.45.2
216.27.175.2
66.92.159.2
66.93.87.2

Sprintlink (Overland Park, KS, US)

199.2.252.10
204.97.212.10
204.117.214.10

Cisco (San Jose, CA, US)

64.102.255.44
128.107.241.185

check rDNS

3 options to check rDNS

To test IP of 100.100.100.1

1) dig -x 100.100.100.1
2) host 100.100.100.1
3) nslookup 100.100.100.1

To test with specific DNS servers:
1) dig @dns_server_ip -x IP_of_server_to_lookup

Wednesday, July 23, 2008

Linux Permissions simplified for me

r = Read permissions = 4
w = Write permissions = 2
x = Excute permissions = 1

Total = 7

3 parts to permissions:

Part 1 = User
Part 2 = Group
Part 3 = World

So "rw-r--r--" = 644
and "rwx-r--r--" = 744
and "rwxrwxrwx" = 777
and "rwxr-xr-x" = 755

Wednesday, July 9, 2008

Create Random password

Linux and Mac-
Type:

$openssl rand -base 64 6

the last digit "6" will be the length of the password.

Friday, July 4, 2008

Postfix command -- helpful

postcat -q "msg id" to display the message within the cli.

Tuesday, July 1, 2008

Cooking

Cooking corn on the grill:

Peel all but the last layer of husks off of the corn. Cook on grill over high to medium heat. turn corn every 2 minutes for total of 10 minutes.

Very good corn!!!

Tuesday, May 13, 2008

Manually change IP info on Linux

To change the IP address on Linux manually, do the following:

$ sudo vi /etc/network/interfaces

You should see something like this:

auto eth0
iface eth0 inet dhcp

Change it to this:

auto etho
iface eth0 inet static
address 192.168.1.00
netmask 255.255.255.0
gateway 192.168.1.1

replacing the IP addresses with your network addresses....

To change the DNS settings, do the following:

$ sudo vi /etc/resolv.conf

add the DNS servers IP address that you want to use


When you are done make sure you restart the networking components:

$ sudo /etc/init.d/networking restart

Thursday, May 8, 2008

When evolution is not showing all messages in the Inbox

When evolution is not displaying all message that are in the Exchange inbox.

Close Evolution

rm -rf .evolution/exchange .evolution/mail/exchange

re-open evolution

you should now see all messages again

possible bug 353715

Tuesday, April 29, 2008

Google reader shortcuts

I am tried of forgetting these and then looking for them

j/kitem down/upselects the next/previous item in the list
space/shift-spacepage down/upmoves the page down/up
n/pscan down/upin list view, selects the next item without opening it
oopen/close itemin list view, expands or collapses the selected item
enteropen/close itemin list view, expands or collapses the selected item
stoggle starstars the selected item
shift-stoggle shareshares the selected item
mmark as read/unreadswitches the read state of the selected item
ttag an itemopens the tagging field for the selected item
vview originalopens the original source for this article in a new window
shift-amark all as readmarks all items in the current view as read
1expanded viewdisplays the subscription as expanded items
2list viewdisplays the subscription as a list of headlines
rrefreshrefreshes the unread counts in the navigation
shift-n/pnavigation down/upselects the next/previous subscription or folder in the navigation
shift-xnavigation expand/collapseexpand or collapse a folder selected in the navigation
shift-onavigation open subscriptionopens the item currently selected in the navigation
ghgo to homegoes to the Google Reader homepage
gago to all itemsgoes to the "All items" view
gsgo to starred itemsgoes to the "Starred items" view
gtgo to tagallows you to navigate to a tag by entering the tag name
gugo to subscriptionallows you to navigate to a subscription by entering the subscription name
utoggle full screen modehides and shows the list of subscriptions
?keyboard shortcuts helpdisplays a quick guide to all of Reader's shortcuts

Thursday, April 17, 2008

Backing up Thunderbird

Backup Thunderbird to a backup_directory
tar zcvf /home/username/backup_dir/tbbackup.tar.gz /home/username/.mozilla-thunderbird.

Restoring Thunderbird
*make sure thunderbird is not running*
tar -zxvf /home/username/tbbackup.tar.gz -C /home/username

Credit to:
http://www.cyberciti.biz/faq/linux-backup-thunderbird-email-profile/

Wednesday, March 26, 2008

Mount a Windows share from Ubuntu

How to mount a windows share from ubuntu

# Install smbfs
sudo apt-get install smbfs

# get the UID of the single user, this will be used in editing /etc/fstab
grep $username /etc/passwd | cut -d: -f3
# NOTE $username = the real users login name

# create a file under /home/$username/ named ".smbcredentials" with the following text
username=MyUsername (username could also be username@domain)
password=MyPassword

# protect the .smbcredentials file, because your password is in plain text
sudo chown root .smbcredentials
sudo chmod 600 .smbcredentials

# backup the /etc/fstab
sudo cp /etc/fstab /home/username/backups/

# edit fstab (I used cifs). Make sure its all on 1 line. use the uid you got earlier
//servername/sharename /path/to/mnt cifs credentials=/path/to/.smbcredentials,uid=1000 0 0

# reload fstab
sudo mount -a

Thursday, February 21, 2008

Display Primary and Secondary DNS in Linux

Type the following to display the DNS servers being used by your system

$ cat /etc/resolv.conf

Tuesday, January 15, 2008

Terminal Emulation for Linux

For security and remote administration reasons you can "screen" out of your working terminal and close out of your shell and have access to the working shell remotely and local when you need it. To do this follow the steps below.

Su to root:
$su -
type:
# screen
Now type your commands:
# tshark -i xxxxxxxx
Now hold down the following keys at the same time:
# CTRL + a + d
This detaches the screen and allows you to exit the terminal window.


To access the detached terminal do the following:
From local:
$ su -
# screen -R
This gets you back into the terminal you were working on.

From remote:
ssh to the server
$ su -
#screen -R
You will she your command still running.


Thanks to scm for showing me this.