Wednesday, June 23, 2010

reset your mysql root password

Stop mysql dulu

#/usl/local/etc/rc.d/mysql-server stop.

#mysqld_safe --skip-grant-tables

than open new shell and go to the mysql-server

#mysql --user=root mysql

now you enter the mysql server and run this command

update user set Password=PASSWORD('new-password') where user='root';
flush privileges;
exit;

start the server

done

Tuesday, June 15, 2010

make symbolic link on Unix

# ln -s /usr/home /home or ln -s /data/moodle2/ moodle2

Sunday, June 13, 2010

How to Lock / Unlock User in ubuntu

For Locking User from command Line

$ sudo usermod -L waxs This will Lock user account named waxs

For Locking User from command Line

$ sudo usermod -U waxs This will UnLock user account named waxs

Thursday, June 3, 2010

list all installed application on ubuntu

list all installed application on ubuntu

dpkg --get-selections

Tuesday, June 1, 2010

Centos - Adduser

You can also do this from the command line, below are the equivalent commands. You need to have root level access to use the commands below.
  • usr/sbin/useradd [options] login_name
    creates a new user
  • usr/sbin/usermod [options] login_name
    modifies a user’s attributes
  • usr/sbin/userdel [options] login_name
    deletes the specified user. Use the -r option to automatically remove the user’s home directory and mail spool.
  • usr/bin/passwd login_name
    sets the password for the specified user
  • usr/sbin/groupadd [options] group_name
    creates a new group
  • usr/sbin/groupmod [options] group_name
    modifies a group’s attributes
  • usr/sbin/groupdel group_name
    deletes the specified group