jueves, 26 de julio de 2012

Fetch External Repositories on Ubuntu How to

DesdeUbuntu Karmic Koala disponemos de una nueva herramienta para añadir repositorios PPA de Launchpad de una forma mucho más sencilla, copiando una línea mucho más simple que además descarga y añade automáticamente su clave GPG. Puede hacerse desde el terminal, ejecutando el siguiente comando: 

sudo add-apt-repository ppa:nombre_del_ppa

Además, este nuevo sistema no añade la línea completa al fichero /etc/apt/sources.list sino que lo crea con su propio fichero en el directorio sources.list.d, lo cual suele ser mucho mejor para el mantenimiento del sistema, tener todos los repositorios en ficheros diferentes.

The program 'add-apt-repository' is currently not installed.  You can install it by typing:

apt-get install python-software-properties

----- /usr/bin/add-apt-repository

----- /usr/bin/apt-add-repository


Free open source project hosting. Repository based on the Bazaar VCS.

 https://launchpad.net/


https://help.launchpad.net/Packaging/PPA


How do I update Ubuntu Linux softwares.

Using apt-get command line tool

apt-get is the command-line tool for handling packages. You can use following command options:

=> apt-get update : Update is used to resynchronize the package index files from their sources via Internet.

=> apt-get upgrade : Upgrade is used to install the newest versions of all packages currently installed on the system.

=> apt-get install package-name : install is followed by one or more packages desired for installation. If package is already installed it will try to update to latest version.

=> To upgrade individual software called foo type command: apt-get install foo


More info @ https://help.ubuntu.com/11.04/serverguide/package-management.html 


More info @ http://www.guia-ubuntu.org/index.php?title=A%C3%B1adir_repositorios_externos 

jueves, 19 de julio de 2012

chattr - change file attributes on a Linux file system

This command can be helpful, when set to use Public Google DNS on your computer.

If your ISP assigned you DNS, it will request every time your computer boots.

chattr - change file attributes on a Linux file system

The  operator `+' causes the selected attributes to be added to the existing attributes of the files; `-' causes them to be removed; and `=' causes them to be the only attributes that the files have.

immutable (i)

A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can  be  written to the file.  Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.

So you can block your /etc/resolv.conf file as root user.

chattr +i /etc/resolv.conf  


unlock

chattr -i /etc/resolv.conf

More information on chattr man page.

miércoles, 18 de julio de 2012

Ubuntu 12.04 to feature extended support period for desktop users





http://www.canonical.com/content/ubuntu-1204-feature-extended-support-period-desktop-users

Understand command sudo su -

Why if I typed the three commands sudo su - with my user after a passwords is ask, I became root user ?

sudo onlfy work if the user is permit to use this app; from /etc/sudoers file.

su Invoked without a username, su defaults to becoming the superuser.
 
- The optional argument - may be used to provide an environment similar to what the user would expect had the user logged in directly.


man pages

sudo, sudoedit ---> execute a command as another user.

su ---> change user ID or become superuser

martes, 17 de julio de 2012

Talk over the console

First install talk & talkd
apt-get install talk talkd 


developer@ubuntu:~$ mesg 
mesg is n 
to change mesg
developer@ubuntu:~$ mesg y

mesg is y
Talk on a LAN network 



user bob wants to chatt with sawar 
talk sawar@172.16.1.108 

At host sawar the follow is prompt

Message from Talk_Daemon@server1 at 22:44 ...    
talk: connection requested by bob@172.16.1.101. 
talk: respond with:  talk bob@172.16.1.101  



Respond with talk bob@172.16.1.101   

Done. - 

Temporarily Changing User Identity with the su Command

A popular misconception is that the su command is short for super-user; it really just means substitute user. An important but often overlooked distinction is that between su and su -. In the former instance, you become that user but keep your own environmental variables (such as paths). In the latter, you inherit the environment of that user.

This is most noticeable when you use su to become the super-user, root. Without appending the -, you do not inherit the path variable that includes /bin or /sbin, so you must always enter the full path to those commands when you just su to root.



https://help.ubuntu.com/community/RootSudo

lunes, 16 de julio de 2012

Install JAVA by hand

1. Download jdk-6u33-linux-i586.bin

http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. mkdir opt {java/latest}


3. Unpack sh jdk-6u33-linux-i586.bin --> /opt/java/latest


4. Append Java bin to your PATH

   export PATH=/opt/java/latest/bin:$PATH


5. Set JAVA_HOME

   export JAVA_HOME=/opt/java/latest/

sábado, 7 de julio de 2012

Fibertel : entrie

addr: 190.18.173.8      201.231.68.245          201.231.69.249    190.18.171.241


http://dnsknowledge.com/tutorials/debian/bind9/linux-set-bind9-caching-dns-nameserver

iptables -I INPUT -p udp -m udp --dport 53 -j ACCEPT

iptables -I INPUT -p tcp -m tcp --dport 53 -j ACCEPT

install bind9 should I open port 53 on iptables ???? like this ????

##################################################################################

http://dnsknowledge.com/tutorials/debian/bind9/linux-set-bind9-caching-dns-nameserver

# iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 53 -j ACCEPT
# iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 53 -j ACCEPT


tcpdump -n -s 1500 -i eth1 udp port 53


Erase from iptables *filter table

-A INPUT -p tcp -m tcp --dport 53 -j ACCEPT

martes, 3 de julio de 2012

Using Google Public DNS


When you use Google Public DNS, you are changing your DNS "switchboard" operator from your ISP to Google Public DNS.
In most cases, the IP addresses used by your ISP's domain name servers are automatically set by your ISP via the Dynamic Host Configuration Protocol (DHCP). To use Google Public DNS, you need to explicitly change the DNS settings in your operating system or device to use the Google Public DNS IP addresses. The procedure for changing your DNS settings varies according to operating system and version (Windows, Mac or Linux) or the device (computer, phone, or router). We give general procedures here that might not apply for your OS or device; please consult your vendor documentation for authoritative information.
Note: We recommend that only users who are proficient with configuring operating system settings make these changes.


https://developers.google.com/speed/public-dns/docs/using