Mysterious new eth0: line in agetty login prompt

After recently updating to Leap 15.3, I noticed that text logins (or is the terminology ttys? agettys?) now have an additional line that appears to be listing the name of the wired ethernet interface, eth0. I usually login via the GUI, (which uses sddm, I think) so I am not positive when this eth0 line began appearing, but the release update to 15.3 from 15.2 and the package updates done immediately following that are the most recent major changes to software I have made.

Confusingly, wired ethernet is not even connected, so I do not see any reason for eth0 to be shown here rather than the loopback or wireless interface. Across multiple reboots, it is always eth0 that is listed.

Welcome to openSUSE Leap 15.3 - Kernel 5.3.18-59.16-preempt (tty{NUMBER}).

eth0:


{HOSTNAME} login:

Does anyone know what this is, and why it is there?

Frankly it is a bit disturbing to unexpectedly see network interface names appearing on the local login screen of a machine that has not ever used network login or any other services that would be using a network connection at the login screen. From the initial setup of this machine, I have not made any configuration changes to agetty.

This comes from “/etc/issue”. However, this file is automatically generated. You can check

man issue-generator

to see what you can configure.

If your Ethernet card gets an IP (is connected to your net) in multi-user.target (Runlevel 3), this will be shown.

I do not know if it matters that I am on 15.2, but I have no man page for issue-generator, but in the man page for agetty there is a section ISSUE FILES that describes it.

Probably superfluous, but on my system, not changed by me:

henk@boven:~> cat /etc/issue
Welcome to \S - Kernel \r (\l).


henk@boven:~>

Unit is enabled by default:

**3400G:~ #** systemctl list-unit-files issue-generator.service 
UNIT FILE               STATE   VENDOR PRESET
issue-generator.service **enabled enabled      **

1 unit files listed. 
**3400G:~ #** 

Users may disable it by running ‘systemctl disable issue-generator.service’.

cat /etc/issue
Welcome to \S - Kernel \r (\l).

eth0: \4{eth0} \6{eth0}

It is probably new for 15.3. I did check on a 15.2 system, and what the OP describes does not happen there.

There was a discussion of this, perhaps 2-3 years ago, when it showed up on Tumbleweed. The discussion was in the factory mailing list. That’s how I knew where to look.

It pays to keep up with Tumbleweed. What happens there today will show up in other systems in the future.

When you more or less saw that discussion, can you recap what the joy of this is? What is the important message to the user that logs in?

It’s getting worse –


> stat /etc/issue
  File: /etc/issue -> ../run/issue
  Size: 12              Blocks: 0          IO Block: 4096   symbolic link
Device: 802h/2050d      Inode: 4064634     Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-07-14 15:32:15.863952325 +0200
Modify: 2021-07-14 15:01:35.583977479 +0200
Change: 2021-07-14 15:01:35.583977479 +0200
 Birth: 2021-07-14 15:01:35.583977479 +0200
 > 

And also this – “man 8 agetty”


       agetty opens a tty port, prompts for a login name and invokes the /bin/login command.  It is normally invoked by init(8).

       agetty has several non-standard features that are useful for hardwired and for dial-in lines:
 .
 .
       o      Optionally does not display the contents of the /etc/issue file.

       o      Optionally displays an alternative issue files or directories instead of /etc/issue or /etc/issue.d.
 .
 .
       -i, --noissue
              Do not display the contents of /etc/issue (or other) before writing the login prompt.  Terminals or communications
              hardware  may  become confused when receiving lots of text at the wrong baud rate; dial-up scripts may fail if the
              login prompt is preceded by too much text.

AFAICS, the only way to get rid of the “agetty” issue is to, edit ‘/usr/lib/systemd/system/getty@.service’ –

  • Modify the “ExecStart=-/sbin/agetty -o ‘-p – \u’ --noclear %I $TERM
    ” line to include the “–noissue” option …

Found it –

  • The file ‘/run/issue.d/70-eth0.conf’ is generated by the Bash script ‘/usr/sbin/issue-generator’ …

 > cat /run/issue.d/**70-eth0.conf** 
eth0: \4{eth0} \6{eth0}
 > 

And, the “issue.d” man (5) page –


       Files in /etc/issue.d override files with the same name in /usr/lib/issue.d and /run/issue.d. Files in /run/issue.d
       override files with the same name in /usr/lib/issue.d. Packages should install their configuration files in
       /usr/lib/issue.d. Files in /etc/issue.d are reserved for the local administrator, who may use this logic to override the
       files installed by vendor packages. All configuration files are sorted by their filename in lexicographic order,
       regardless of which of the directories they reside in.

Therefore, to get rid of the “eth0:” line, simply create an empty file in ‘/etc/issue.d/’ with the name “70-eth0.conf” –

  • To get it to work, the “empty” file may need a single space as the only content …

No. As best I can tell, it is change for the sake of change. But I can deal with it (by mostly ignoring it).

Who invokes issue-generator?

Therefore, to get rid of the “eth0:” line, simply create an empty file in ‘/etc/issue.d/’ with the name “70-eth0.conf” – To get it to work, the “empty” file may need a single space as the only content …
No space needed. A zero length file works.

I checked, and my issue file is indeed the same as in Sauerland’s post.

The ethernet card is connected to nothing and is reported by ip address command to be in a down state; hence my confusion. It was not connected during the 15.2 → 15.3 update or since.

nrickert could you link to the discussion you mention, I would not know where to look, or how it would have been phrased; my initial searches for “opensuse network interface on login” and similar terms did not turn up

I found something better; the man page for issue-generator states:


OPTIONS
…
network add|remove interface
    Creates a deletes files of the format /run/issue.d/70-*interface*.conf. This files contains the
    name of the *interface* and the escape codes for [agetty(8)](https://kubic.opensuse.org/documentation/man-pages/agetty.8.html) to insert the IPv4 and IPv6 addresses.
    **By default, only network interfaces where the name starts with 'b' or 'e' are added. Which
    interfaces are shown is configureable via a regex expression in in the variable
    *NETWORK_INTERFACE_REGEX* in /etc/sysconfig/issue-generator.**

so it looks like the best place to modify this behaviour would be in /etc/sysconfig/issue-generator ; if it really is just a simple regex, that would explain why it shows eth0 despite having no IP.
**
Sauerland**, is that some other kind of configuration that you have, where it checks for an IP? Is there some reason for the default 15.3 config only showing e… and b… interfaces?

So maybe the change here is that Leap 15.3 added this issue-generator system?

I’m not sure how to find it.

In the past, I would have looked at the mailing list archives (for the factory mailing list). But the software currently used for the mailing list archives are so cumbersome, that I’m not sure how to go about it.

So maybe the change here is that Leap 15.3 added this issue-generator system?

Yes, I think that’s right.

It’s a fallout of closing the Leap gap.

Index — List documentation from the SUSE CaaSP platform project: https://users.suse.com/~kukuk/SUSE-CaaSP-Docu/index.html

  SUSE CaaS Platform is an enterprise-class container management solution       that enables IT and DevOps professionals to more easily deploy, manage,       and scale container-based applications and services. It includes Kubernetes       to automate lifecycle management of modern applications, and surrounding       technologies that enrich Kubernetes and make the platform itself easy       to operate. As a result, enterprises that use SUSE CaaS Platform can reduce       application delivery cycle times and improve business agility: https://documentation.suse.com/suse-caasp/4.5/

Should that mouth full of gibberish explain why something so simple as the /etc/issue file should be subjeced after 50 years of existence into such nonsensical behavior? People should be free to have hobbies. I have, But I keep them to myself.

Maybe but, it won’t get rid of the “eth0” line – that’s (normally) defined in ‘/run/issue.d/70-eth0.conf’ …

  • Therefore, override the content of “70-eth0.conf
    ” …

[HR][/HR]BTW, modifying ‘/etc/sysconfig/issue-generator’ isn’t a good idea –


 > rpm --query --whatprovides /etc/sysconfig/issue-generator
file /etc/sysconfig/issue-generator is not owned by any package
 > 
 > rpm --query --whatprovides /usr/lib/systemd/system/issue-generator.service
issue-generator-1.7-1.17.noarch
 > 
 > rpm --query --scripts issue-generator | grep -iE '/etc/sysconfig/|PNAME'
    PNAME=issue-generator 
    SUBPNAME= 
    SYSC_TEMPLATE=/usr/share/fillup-templates/sysconfig.$PNAME$SUBPNAME 
        SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME$SUBPNAME 
            echo "Updating /etc/sysconfig/$SD_NAME$PNAME ..." 
            mkdir -p /etc/sysconfig/$SD_NAME 
            touch /etc/sysconfig/$SD_NAME$PNAME 
            /bin/fillup -q /etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE 
        echo "/etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" 
                test -f /etc/sysconfig/services -a \
                     -z "$DISABLE_STOP_ON_REMOVAL" && . /etc/sysconfig/services
                        test -f /etc/sysconfig/services -a \
                             -z "$DISABLE_RESTART_ON_UPDATE" && . /etc/sysconfig/services
 > 
 > cat /usr/share/fillup-templates/sysconfig.issue-generator 
## Path:        System/Login
## Description: /etc/issue generator
## Type:        string
## Default:     "^[be]"
#
# Defines a regex, for which network interfaces
# /etc/issue should present the IP number
#
NETWORK_INTERFACE_REGEX="^[be]"
 > 
 > rpm --query --whatprovides /usr/share/fillup-templates/sysconfig.issue-generator
issue-generator-1.7-1.17.noarch
 > 

As you can see, ‘/etc/sysconfig/issue-generator’ isn’t provided by but, is generated by, the RPM package “issue-generator” …

Yes, but –

  • Maybe.
  • Meaning that.
  • When one logs into an openSUSE system via SSH, one lands on something which behaves like a VT.
  • The question is, is it “nice to know
    ” the IP address of the target system? - My answer is – “If I’m a system administrator up to my ears in the normal daily issues which tend to always unexpectedly appear then,
    ” – definitely, YES. - Also, anyone using a system administration tool also needs to have a view of the IP addresses of the systems being managed –
    *=2]The, “Where have I landed?” syndrome.

Yes, if you’re not involved in system administration activities, then, you’re possibly wondering about all this fuss …

Huh? The very purpose of files under /etc/sysconfig is to be modified by local administrator to tune software behavior.

So let me get this straight,

  1. /etc/issue is being auto-generated by a whole collection of files including
  2. /run/issue.d/70-eth0.conf which is auto-generated according to the NETWORK_INTERFACE_REGEX
    variable in 1. /etc/sysconfig/issue-generator which is auto-generated by
  3. /usr/share/fillup-templates/sysconfig.issue-generator

So where are you supposed to adjust this behavior? Overriding individual files in issue.d sounds (no offense) like a dumb game of whac-a-mole… I imagine it’s only slightly better to use the issue-generator network remove command that is mentioned in the man page, but you are still fighting a regex with one-off fixes; the real solution would be to fix the regex itself, otherwise you have to repeat this if you add a new network card (eth1, eth2, …).

Should we modify that fill-up template if we want to remove this? There has to be some kind of reasonable place for configuration changes to be made at this level.

That’s what I was hoping, but I guess not if a script is going to be overwriting it regularly.