Wednesday, November 20, 2013

Centos : Create User with Root privilledges

This command can be execute to user who has root priviledge


  • Create user :

$ sudo /etc/sbin/useradd namefouser

  • Setting user password "

$ sudo /etc/bin/passwd nameofuser

  • Allow user to ssh
$ sudo vim /etc/ssh/sshd_config
There's some way to allow user to execute command :

  • Add user to sudoers  
$ sudo /etc/sbin/visudo
  • Add user to wheel group which is wheel is a group that sudoers allowed group.
$ sudo /etc/sbin/usermod -a -G wheel namefouser

Monday, November 18, 2013

Flush DNS on Linux

On Windows Operating system to delete all DNS query result we use to be use command IPCONFIG /FLUSHDNS, in Linux there's serveral command to flush DNS :

1. Flush dns by restarting NSCD service : 


  • $ sudo /etc/init.d/nscd restart
  • # service nscd restart
  • # service nscd reload

2. Flush dnsmasq DNS cache :

  • $ sudo /etc/init.d/dnsmasq restart
  • # service dnsmasq restart

3. Flush Caching BIND server DNS Cache :

  • # /etc/init.d/named restart
  • # rndc restart
  • # rndc exec