Symas OpenLDAP Knowledge Base

Fast Facts

View System Domain

    hostname -d 

Change System Hostname

Ubuntu/Debian

  1. Install gksu Ubuntu: sudo apt-get install gksu
  2. Run the following: Gksudo gedit /etc/hostname
  3. Enter root password
  4. Edit the hostname file and save
  5. Close all windows and reboot

CentOS/RedHat

RedHat based system use the file /etc/sysconfig/network to read the saved hostname at system boot. This is set using the init script /etc/rc.d/rc.sysinit/etc/sysconfig/network:

    NETWORKING=yes 
    HOSTNAME=”plain.domainname.com” 
    GATEWAY=”192.168.0.1? 
    GATEWAYDEV=”eth0? 
    FORWARD_IPV4=”yes” 

Restart Network Interface

    sudo /etc/init.d/networking restart 

Disk I/O Tool

    vmstat 3        # Lists current input/output demands on the hard drive 

View List of User Accounts

    cat /etc/passwd 

or getent passwd