1. Connect to the server using SSH and login as the admin user.
2. Switch to the root user using the su command.
3. Using your Web browser, browse to the DirectAdmin control panel at http://<server ip>:2222.
3. Sign into the control panel using the DirectAdmin admin username and password.
Change Shell Passwords
1. Make sure you are connected to the server as the root user using SSH.
2. Change the admin user’s password:
# /usr/bin/passwd admin
(set new password)
3. Change the root user’s password:
# su -
# /usr/bin/passwd
(set new password)
Setup Secure Shell (SSH) Service
1. Add the admin user to the wheel group:
# usermod -G wheel admin
2. Edit the server’s SSH configuration file:
# nano -w /etc/ssh/sshd_config
3. To allow only SSH protocol 2 connections, find the line:
#Protocol 2, 1
4. Uncomment it and change it to:
Protocol 2
5. Next, to disable direct root login, find the line:
#PermitRootLogin yes
6. Uncomment it and change it to:
PermitRootLogin no
7. Next, to change the port that SSH listens on, find the line:
#Port 22
8. Uncomment it and change it to:
Port 1022
9. Save the file and exit the editor.
10. Restart the SSH service:
# service sshd restart
Change the Server Admin Username
1. Change the admin username:
# cd /usr/local/directadmin/scripts
# ./change_username.sh admin newuser
2. Edit the server’s SSH configuration file:
# nano -w /etc/ssh/sshd_config
3. Find the line:
AllowUsers admin
4. Change it to:
AllowUsers newuser
5. Save the file and exit the editor.
6. Restart the SSH service:
# service sshd restart
7. Edit the DirectAdmin list of allowed admins file:
# nano -w /usr/local/directadmin/data/admin/admin.list
8. Change the line with the admin username to the new username for the admin account.
9. Save the file and exit the editor.
Set the Server’s Date and Time
1. Set the server’s time zone:
# rm -f /etc/localtime
# ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
2. Update the current system time:
# /usr/bin/rdate -s clock.psu.edu
3. Set the ZONE entry in the file /etc/sysconfig/clock to “America/New_York”.
4. Set the hardware clock:
# /sbin/hwclock –-systohc
5. Setup a new hourly cron job to keep the server’s time accurate:
# touch /etc/cron.hourly/rdate
# chmod 755 /etc/cron.hourly/rdate
# nano -w /etc/cron.hourly/rdate
6. Paste the following lines into the new cron file:
#!/bin/sh
host=”clock.psu.edu”
/usr/bin/rdate -s $host >/dev/null 2>&1 && /sbin/hwclock –-systohc >/dev/null 2>&1
7. Save the file and exit the editor.
** Not complete
2. Switch to the root user using the su command.
3. Using your Web browser, browse to the DirectAdmin control panel at http://<server ip>:2222.
3. Sign into the control panel using the DirectAdmin admin username and password.
Change Shell Passwords
1. Make sure you are connected to the server as the root user using SSH.
2. Change the admin user’s password:
# /usr/bin/passwd admin
(set new password)
3. Change the root user’s password:
# su -
# /usr/bin/passwd
(set new password)
Setup Secure Shell (SSH) Service
1. Add the admin user to the wheel group:
# usermod -G wheel admin
2. Edit the server’s SSH configuration file:
# nano -w /etc/ssh/sshd_config
3. To allow only SSH protocol 2 connections, find the line:
#Protocol 2, 1
4. Uncomment it and change it to:
Protocol 2
5. Next, to disable direct root login, find the line:
#PermitRootLogin yes
6. Uncomment it and change it to:
PermitRootLogin no
7. Next, to change the port that SSH listens on, find the line:
#Port 22
8. Uncomment it and change it to:
Port 1022
9. Save the file and exit the editor.
10. Restart the SSH service:
# service sshd restart
Change the Server Admin Username
1. Change the admin username:
# cd /usr/local/directadmin/scripts
# ./change_username.sh admin newuser
2. Edit the server’s SSH configuration file:
# nano -w /etc/ssh/sshd_config
3. Find the line:
AllowUsers admin
4. Change it to:
AllowUsers newuser
5. Save the file and exit the editor.
6. Restart the SSH service:
# service sshd restart
7. Edit the DirectAdmin list of allowed admins file:
# nano -w /usr/local/directadmin/data/admin/admin.list
8. Change the line with the admin username to the new username for the admin account.
9. Save the file and exit the editor.
Set the Server’s Date and Time
1. Set the server’s time zone:
# rm -f /etc/localtime
# ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
2. Update the current system time:
# /usr/bin/rdate -s clock.psu.edu
3. Set the ZONE entry in the file /etc/sysconfig/clock to “America/New_York”.
4. Set the hardware clock:
# /sbin/hwclock –-systohc
5. Setup a new hourly cron job to keep the server’s time accurate:
# touch /etc/cron.hourly/rdate
# chmod 755 /etc/cron.hourly/rdate
# nano -w /etc/cron.hourly/rdate
6. Paste the following lines into the new cron file:
#!/bin/sh
host=”clock.psu.edu”
/usr/bin/rdate -s $host >/dev/null 2>&1 && /sbin/hwclock –-systohc >/dev/null 2>&1
7. Save the file and exit the editor.
** Not complete