raspi-config host name handling inconsistent

Bug #1730754 reported by tobias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

in raspi-config entering a host name with spaces (e.g. "test 123") results in an insconsistent entry in /etc/hostname and /etc/hosts.

/etc/hostname: "test123"
/etc/hosts: "127.0.0.1 test 123"

this results in an error message when using "sudo" that the host name is unknown. changing the line in /etc/hosts into "127.0.0.1 test123" resolves that error message.

solution: remove spaces in newly entered hostname not only for /etc/hostname entry but also for /etc/hosts entry.

tobias

Revision history for this message
tobias (tgd1975) wrote :

Linux raspberrypi 4.9.41+ #1023 Tue Aug 8 15:47:12 BST 2017 armv6l GNU/Linux

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.