Current64 - Sun Nov 19 03:36:30 UTC 2017 updates - login runlvl=3 minor inconsistency
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Current64 - Sun Nov 19 03:36:30 UTC 2017 updates - login runlvl=3 minor inconsistency
Current64 - Sun Nov 19 03:36:30 UTC 2017 updates - login runlvl=3:
Code:
Slackware 14.2
riposo login: root
Password:
Login incorrect
riposo.burdi.nl login: root
Password:
Linux 14.4.0.
You have mail.
root@riposo:~#
Edit: For a good understanding: The first time I entered a wrong password. The inconsistency I notice is that the first prompt uses the short hostname, whereas the second prompt uses the long hostname.
Last edited by burdi01; 11-20-2017 at 11:55 AM.
Reason: Explanation
I never log in as root, but, I did try to reproduce your results. I logged out of my Slackware64-current work station running KDE. I successfully logged in as root at run level 3. I didn't see your result. Perhaps you typed the root password incorrectly?
The first password prompt is written to the screen by the /sbin/agetty process. After an invalid user/password entry, the second prompt is written by /bin/login.
My guess is that one is displaying the short hostname, and the other is displaying the nodename (uname -n). If these are different, then you see the discrepancy.
a/sysvinit-scripts-2.1-noarch-2.txz: Rebuilt.
inittab: Have agetty display the FQDN, since /bin/login does.
I wish I hadn't said anything now. Pat has made it consistent for you and inconsistent for me (I use a shortname in /etc/HOSTNAME to keep things the same as how they were).
Besides,
"name.subdomain.domain.com login:" looks more ridiculous with every additional subdomain..
Oh well, I guess I'll just be using a custom inittab from here on in.
For the record, or for posterity, from today's -current changelog:
Wed Nov 22 05:27:06 UTC 2017
[...]
a/shadow-4.2.1-x86_64-3.txz: Rebuilt.
Patched to display the short hostname on the login prompt.
a/sysvinit-scripts-2.1-noarch-3.txz: Rebuilt.
On second thought, let's keep using the short hostname on the login prompt
like we always have before. I'm with GazL on this one. :-)
While I haven't restarted my -current laptop the rc.M.new didn't seem to change with respect to the hostname bits:
Code:
# Set the hostname.
if [ -r /etc/HOSTNAME ]; then
/bin/hostname $(cat /etc/HOSTNAME)
else
# fall back on this old default:
echo "darkstar.example.net" > /etc/HOSTNAME
/bin/hostname darkstar
fi
I believe previously (when it was shortening the hostname) it was something like:
Code:
# Set the hostname.
if [ -r /etc/HOSTNAME ]; then
/bin/hostname $(cat /etc/HOSTNAME | cut -f 1 -d .)
else
# fall back on this old default:
echo "darkstar.example.net" > /etc/HOSTNAME
/bin/hostname darkstar
fi
It more or less works. As slackware-current stands as of today for me, /bin/hostname without arguments returns the fully-qualified hostname, probably because I still have the FQDN in /etc/HOSTNAME, and I intend to leave it there. The shell prompt (the prompt you get after a successful login) in a console or X terminal shows a short-form hostname. If I go to a free console (say tty2) where there has been no login, the hostname is also given in short-form. However, if I make an unsuccessful login attempt at the console, then the prompt switches to a fully qualified hostname, and remains so until a successful login is made.
However, if I make an unsuccessful login attempt at the console, then the prompt switches to a fully qualified hostname, and remains so until a successful login is made.
That shouldn't be the case after this mornings updated shadow package and Pat's patch to /bin/login. /bin/login should now truncate the displayed hostname just like agetty does regardless of whether you use a short or fqdn in /etc/HOSTNAME.
This is from hostname(1)
Code:
THE FQDN
The FQDN (Fully Qualified Domain Name) of the system is the name that
the resolver(3) returns for the host name, such as, ursula.example.com.
It is usually the hostname followed by the DNS domain name (the part
after the first dot). You can check the FQDN using hostname --fqdn or
the domain name using dnsdomainname.
You cannot change the FQDN with hostname or dnsdomainname.
The recommended method of setting the FQDN is to make the hostname be
an alias for the fully qualified name using /etc/hosts, DNS, or NIS.
For example, if the hostname was "ursula", one might have a line in
/etc/hosts which reads
127.0.1.1 ursula.example.com ursula
Technically: The FQDN is the name getaddrinfo(3) returns for the host
name returned by gethostname(2). The DNS domain name is the part after
the first dot.
That to me seems to indicate that the hostname should be set to the short name and gethostname() should return that shortname.
That shouldn't be the case after this mornings updated shadow package and Pat's patch to /bin/login. /bin/login should now truncate the displayed hostname just like agetty does regardless of whether you use a short or fqdn in /etc/HOSTNAME.
It seems a reboot was necessary. Now it works as intended.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.