Tag Archives: Ubuntu

Ubuntu is a fast, secure and easy-to-use operating system used by millions of people around the world.

Add New User on Ubuntu

To add user on ubuntu we can use useradd command, which has some options. For example we want to create new user named “cooluser” with password “usercool”, and we want to make the home directory in /home/cooluser

[php]useradd cooluser -p usercool -m [/php]

this command will create new directory in /home/cooluser

to delete user use this command

[php]userdel cooluser[/php]

to observe other option just use man command

[php]man useradd[/php]

Find Out Operating System Version

Sometimes we need to determine what version of our OS. Mostly for all unix, linux os we can do it with ‘uname’ command. for FreeBSD it works well and we can see directly what version our FreeBSD is, but for ubuntu and centos we can get it straight what we need because instead of display OS version its just will display the kernel version.

then i find out that we can use this command

1. cat /etc/issue

2. /etc/lsb-release

3. cat /etc/apt/sources.list (by seeing repository)

On debian u can use this command (in order)

1. cd /etc

2. ls | grep version

On FreeBSD

1. uname -a

Karberos Installation Error

1. Error kinit

root@krb:/home/user# kinit
kinit: Client not found in Kerberos database while getting initial credentials

solution :
we need to write user after kinit
example
root@krb:/home/user# kinit root/admin
Password for root/admin@EXAMPLE.COM :

2. Error krb5-rsh Client
root@krb:/home/user# krb5-rsh -x -PN krb.example.com
error getting credentials: Server not found in Kerberos database

solution :
we need to add princ “host” that is associated with krb services

users and the services must have an appropriate principal entry in the Kerberos database. While users are in form of NAME/ROLE, services are in form SERVICE-NAME/HOSTNAME. So we need to add a principal for service “host” (common name for all shell services), on host where the service is provided — krb.example.com.

sudo kadmin.local
Authenticating as principal root/admin@EXAMPLE.COM with password.

kadmin.local: addprinc -randkey host/krb.example.com

WARNING: no policy specified for host/monarch.spinlock.hr@SPINLOCK.HR; defaulting to no policy
Principal “host/krb.example.com@EXAMPLE.COM” created.

kadmin.local: ktadd -k /etc/krb5.keytab -norandkey host/krb.example.com

kadmin.local: quit

kinit root/admin

source : http://techpubs.spinlocksolutions.com/dklar/kerberos.html#krb-adduser-priv

Error GCC installation

error: Building GCC requires GMP 4.2 , MPFR 2.3.1 and MPC 0.8.0 .Try the –with-gmp, –with-mpfr and/or –with-mpc options to specifytheir locations. Source code for these libraries can be found attheir respective hosting sites as well as at…

i found this problem when i tried to install gcc for avr development on ubuntu

when i went to download site and tried to install it by source i still got problem. i might miss some parameter when i run ./configure.

just to save my time i prefer to do installation by apt-get, fortunately these package of GMP, MPFR, and MPC

[php]
apt-get install libgmp-dev libgmp10
apt-get install libfmpr-dev
apt-get install libmpc-dev
[/php]

for avr development tools
[php]
apt-get install gcc-avr
apt-get install avr-libc
apt-get install gdb-avr
apt-get install avrdude
[/php]

Fatal Server Error: no screens found after installing fglrx

Fatal server error:
no screeen found

after i install fglrx by downloading via amd homepage i got above error on my ubuntu 11.10. apparently there are some miss-configurations after the installation process.

so as suggested by some sites, i uninstall fglrx by running

# cd /usr/share/ati
# sudo sh ./fglrx-uninstall.sh

and once again i reboot my laptop expecting i can get my normal screen, but again
i get
Fatal server error:
no screeen found

if u experience the same problem you may do this :
1. press ctrl+alt+f1 this will bring you to terminal
2. i decide to reinstall fglrx and get new configurations for my display so i run this command
[php]sudo apt-get –reinstall install fglrx[/php]
3. reboot, u should get your normal screen back 🙂

source
http://mrrichard.hubpages.com/hub/2-Ways-to-Install-FGLRX-in-Ubuntu-1110-Oneric
http://askubuntu.com/questions/25519/how-to-remove-amd-unsupported-hardware-without-reinstalling-the-driver

Setting Proxy for Git

Git can use general proxy configuration on server,
such proxy configuration on ubuntu

export http_proxy=http://username:passwd@proxyserver:port

or use config git

[php]git config –global http.proxy http://username:passwd@proxyserver:port[/php]

if your proxy server doesnt need username and password simply write this command

[php]git config –global http.proxy http://proxyserver:port[/php]

now you can use git behind proxy

root@idsubuntu:/home/administrator# git clone http://github.com/Snorby/snorby.git
Cloning into snorby…
remote: Counting objects: 7232, done.
remote: Compressing objects: 100% (2159/2159), done.
remote: Total 7232 (delta 5054), reused 7081 (delta 4926)
Receiving objects: 100% (7232/7232), 4.83 MiB | 17 KiB/s, done.
Resolving deltas: 100% (5054/5054), done.

Apt.conf Proxy Setting on Ubuntu 11.04

Proxy Setting for Apt is needed for us who work behind proxy. It is needed for ubuntu update, package installation, and ubuntu upgrade. This proxy setting used by apt can be configured with apt.conf and if it’s not configured ubuntu will use or read proxy configuration environtmen. read this post setting proxy bactrack or ubuntu to set proxy environtmen.

On ubuntu 10.04 we can find apt.conf in /etc/apt, but on ubuntu 11.04 i can’t find this file. Reading from some articles i found out that ubuntu 11.04 will still read apt.conf configuration if this file is exist. so i just create file apt.conf in /etc/apt/

1. Create apt.conf
nano /etc/apt/apt.conf

2. Insert lines like this

Acquire::http::proxy “http://proxyserver:port/”;
Acquire::ftp::proxy “ftp://proxyserver:port/”;
Acquire::https::proxy “https://proxyserver:port/”;
Continue reading Apt.conf Proxy Setting on Ubuntu 11.04

Restart Crontab on FreeBSD and Linux

Cron is one of the most useful utilities in FreeBSD. Cron is application that running in background that checks file /etc/crontab constantly, it is usually used for automatic commands execution. Using cron and this crontab file you can also start any service you want automatically or scheduled.

crontab
crontab

1. to change crontab or edit crontab file (using ee or vi)
ee /etc/crontab

you will see lines like this

PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin Continue reading Restart Crontab on FreeBSD and Linux

Visual Effect on Gnome with Compiz Fusion

visual effect on gnome will make your desktop more beautiful

for installation

aptitude install compiz compizconfig-settings-manager compiz-fusion-plugins-main compiz-gnome compiz-gtk

to enable this feature do :
1. right click on your desktop
2. click change desktop background
3. go to visual effect
4. choose what u prefer

CompizConfig Setting manager

for managing/editing the effect

System > Preferences > CompizConfig Setting manager

Gnome Visual Effect CompizConfig
Gnome Visual Effect CompizConfig