r.ductor wrote:
> Apparently the hostname parameter is now checked against the
> qualified hostmane. If true, please correct or document it.

There was an additional report of this from Johannes Rohr in
Bug#816915 that turned out to be the same issue.  Now merged with this
report.

On my system I don't see this behavior.  For me it is the opposite.
For me I must use the short hostname or it won't match.

> root@mymachine:~# cat /etc/sudoers.d/local_sudoers
> Host_Alias LOCALHOST = mymachine.somewhere.fr

I am hoping LOCALHOST doesn't collide with some special variable.  In
my testing I didn't use a sudo config host alias.

> ric@mymachine:/root$ sudo --list
> Matching Defaults entries for ric on mymachine.somewhere.fr:

This part seems most informative.  On my machines when I use sudo -l
the hostname display is the short name not the FQDN.

  Wheezy 7 1.8.5p2-1+nmu3+deb7u1 (hostname havoc):
    sudo -l
      User rwp may run the following commands on this host:

  Jessie 8 1.8.10p3-1+deb8u3 (hostname euphoria):
    sudo -l
      User rwp may run the following commands on euphoria:

  Sid 1.8.15-1.1 (hostname hysteria):
    sudo -l
      User bob may run the following commands on hysteria:

There is a change in this area since previously it was reported as
"this host" and now it lists out the actual hostname.  Looking at the
code it has been significantly rewritten.  But in your report it is
listed as the FQDN and not the short hostname.  That is probably the
important clue.

These questions are addressed to either of you, or any other, with
this problem.

What is the hostname of your system?  Is it the short hostname or the
long FQDN?  On mine it is the short name.

  cat /etc/hostname
    euphoria

How is your /etc/hosts configured?

  grep -e '^127.0' -e '^::1' /etc/hosts
    127.0.0.1       localhost
    127.0.1.1       euphoria.proulx.com euphoria
    ::1     localhost ip6-localhost ip6-loopback

What are the contents of your /etc/nsswitch.conf file?

  grep hosts /etc/nsswitch.conf 
    hosts:          files dns

There is a package libnss-myhostname that attempts to resolve dns
names in this area.  I do NOT have it installed.  (For me it broke
something that I forget at this moment.)  Do you have it installed?

  dpkg -l libnss-myhostname

Thanks,
Bob

Attachment: signature.asc
Description: PGP signature

Reply via email to