Thursday, June 9, 2011

adding users in ubuntu

sudo useradd -d /home/testuser -m testuser

sudo passwd testuser


make him sudoer my tweaking the following file

/etc/sudoers

when auto filling doesnt work using tab.....

It is likely your default shell for adding users is Bourne shell, not bash.

Look at /etc/defaults/useradd, and change:

SHELL=/bin/sh

to

SHELL=/bin/bash

So that future user adds will default to bash.

For your current user, you should change their login shell to bash.

chsh -s /bin/bash user_name

installing mysql

sudo apt-get install mysql-server



sudo netstat -tap | grep mysql
When you run this command, you should see the following line or something similar:

tcp 0 0 localhost.localdomain:mysql *:* LISTEN -
If the server is not running correctly, you can type the following command to start it:

sudo /etc/init.d/mysql restart