After changing the hostname the system does not function anymore

## Short introduction
My name is wim dukker and I work with linux since the 80 ths, with Raspberry since the last 5 years and with Dietpi the last 4 weeks. I would like to make my compliments to your community. It was a releave to experience the help when setting up my user account, great!

### My problem
I filled out all the questions in the issue document, but was not able to get that information copied to a USB stick (see “even as root” in the uploaded picture).


I installed the base configuration, included with the following applications : chromium, xrdp, cups, lxde, openssh and ufw. Thereafter I installed with {apt install -y (package)} : libreoffice, xsane, krusader, ppi-apps.

Hardening the system

I made the following modefications to the system:
SSH port 22 : Change configuration files /etc/ssh/sshd_config and ssh_config with text editor gedit, Search for the entry Port 22, Replace port 22 with new port number,

Change port 22 to ufw : ufw allow (new number)/tcp, and close port 22 : ufw deny 22/tcp

New U****ser : sudo useradd (New Username) -s /bin/bash -m -G adm,sudo # => wim, johan

sudo passwd (New Username) #

=> wim, johan

Reboot and log in as New User (wim)

Delete user dietpi : sudo userdel dietpi and sudo rm -rf /home/pi

Change password root : (…)

Change hostname : sudo mousepad /etc/hostname, and sudo mousepad /etc/hosts

Check new hostname: hostname

Hereafter the system did not function well, so I changed the hostname back to Dietpi but without success. I made some pictures from the screen and uploaded these.

I hope sombody let shine his light into my darkness :slight_smile:

Awaiting your reply with kind regards,


Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • Kernel version | uname -a
  • Architecture | dpkg --print-architecture
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
  • Power supply used | (EG: 5V 1A RAVpower)
  • SD card used | (EG: SanDisk ultra)

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

Expected behaviour

Actual behaviour

Extra details

On all my systems (+10) I have changed hostname, however never experienced an issue. Are you sure this is related to the hostname change? Theoretically you could try using dietpi-config to change this.

1 Like

Yes, default window manager in LXDE is openbox.
In the last picture your cp command is wrong, there is a with between the source and the destination path. This has nothing to do with permissions, it’s just wrong syntax.

On DietPi by default dropbear is used. You have to change the port in /etc/default/dropbear.

/etc/hostname is the right place to change it. Did you reboot the system afterwards?

And may I ask which Linux system did you use since the 80s?

Hallo Jappe,

It is sad to say but I was not intended to post this message and stored it as concept. For some reasons it is published. My apologies for the inconvenience (but I will study your comments to learn from).

I am new to dietpi which is much more basic then Raspberry and even more then Ubuntu Linux, so I still have a lot to learn :slight_smile:

To answer your questions about my linux experience: in the 70’s I worked as ICT consultant and all our servers were running linux, and I was impressed. Later I used privately Windows but after a hack I trew all Windows software out of my window and changed it for Ubuntu linux distro’s. My current linux system is Sparky Linux.

I am now retired (77) and computers, and especially low level systems, is my hobby. It is my intention to use my dietpi system as a NAS server, and use SSH to connect the computers together.

Thank you very much for your support.
:wave:, wimduk

I see I had to say Jappe and Joulinar :frowning:

As DietPi is not an own OS, thinks should be quiet similar to Debian. Because at the end DietPi is a set of bash script and some configuration. However it could be that some default tools, available on Debian or Raspbian, are not be installed because we aim to run on the smallest footprint possible.

I do understand and I like that :sweat_smile: