Sunday, February 21, 2010

Update / Upgrade Ubuntu Server

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade


If the kernel or kernel modules have been updated, you should reboot your computer/server.

Thursday, February 11, 2010

No netwrok after clone/copy using VMWare ESX

After making a copy/clone of an ubuntu server 8.10, i face a network problem.

1. "ifconfig" shows no eth0 device, just the 127.0.0.1 loopback
2. "/etc/init.d/networking restart" reports:

SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.

Solution
When you create a complete clone/copy of your vmware machine, a new ethernet MAC address is assigned.

follow this step :
as a root
run this CLI
# rm -fr /etc/udev/rules.d/70-*
# reboot

after wakeup, try ifconfig.
now you get your network back.

Salud!

Tuesday, February 9, 2010

SUDO on FreeBSD

as root install

sudo located at /usr/ports/security/sudo
make configure
make && make install

edit conf at

ee /usr/local/etc/sudoers

example and edit :

# Runas alias specification

# User privilege specification
root ALL=(ALL) ALL
kenan ALL=(www) ALL

note :

This Sudo command limits the user's power on the basis of the configuration made on the file "/etc/sudoers".
Generally in default case you might see something like this:

root ALL=(ALL) ALL
Above, you can see ALL 3 times. But what does it mean?
The first ALL: Run from any(all) host
The Second ALL: From any Terminal
The third ALL: Can Run any command

example :
usename ALL=(group) ALL


** note : !/usr/bin/su (this will prevent user to sudo su)

General sudoers File Record Format
usernames/group servername = (usernames command can be run as) command

Lock / Unlock user on FreeBSD

Lock user :

pw lock nameuser

unlock user :

pw unlock nameuser