LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-20-2017, 09:39 AM   #1
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Rep: Reputation: 114Reputation: 114
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
 
Old 11-20-2017, 09:55 AM   #2
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
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?
 
Old 11-20-2017, 11:52 AM   #3
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
@hitest: I added an explanation to my initial post.
 
1 members found this post helpful.
Old 11-20-2017, 12:14 PM   #4
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
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.
 
2 members found this post helpful.
Old 11-21-2017, 03:03 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Code:
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.
 
4 members found this post helpful.
Old 11-21-2017, 09:16 AM   #6
magicm
Member
 
Registered: May 2003
Distribution: Slackware
Posts: 237

Rep: Reputation: 152Reputation: 152
@GazL - just curious - how are you planning on customizing your inittab?
 
Old 11-21-2017, 10:12 AM   #7
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Oh, nothing fancy, just s/--long-hostname// to go back to displaying the shortname.
 
2 members found this post helpful.
Old 11-22-2017, 07:43 AM   #8
heyjann
Member
 
Registered: Dec 2015
Posts: 102

Rep: Reputation: Disabled
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. :-)
 
3 members found this post helpful.
Old 11-22-2017, 08:11 AM   #9
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 530

Rep: Reputation: Disabled
Did today's patch work for anyone?

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
 
Old 11-22-2017, 08:44 AM   #10
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by TommyC7 View Post
Did today's patch work for anyone?
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.
 
Old 11-22-2017, 10:46 AM   #11
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by chrisVV View Post
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.
 
1 members found this post helpful.
Old 11-22-2017, 12:07 PM   #12
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by GazL View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware64 + Multilib and glibc update for Fri Jun 30 21:14:15 UTC 2017 kjhambrick Slackware 4 07-02-2017 07:22 AM
strange message on slackware64-current after update to Thu May 4 22:14:08 UTC 2017 USUARIONUEVO Slackware 2 05-05-2017 04:23 AM
[SOLVED] /dev/net missing in Current's Fri Nov 20 21:52:15 UTC 2015 update tux_dude Slackware 15 11-22-2015 10:57 PM
Ubuntu 14.04.3 LTS x64 freezes at login after minor updates KevinCain Ubuntu 2 08-10-2015 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration