Failure to be root is repored in a misleading message

Bug #1737657 reported by Kevin O'Gorman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ntp (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

This is a feature request.

When solving a problem or in a rush, I don't necessarily remember everything from a man page, or even think to read it. This is what happened with ntpdate(8)

$ ntpdate
11 Dec 20:08:12 ntpdate[13930]: no servers can be used, exiting
$

Of course, I should have used sudo. And it's documented. But as I pointed out that doesn't help much when in a hurry or stressed. My bad, so I usually wouldn't mention it. But the fix is so simple I hope it appeals to you.

-> test the permissions and if they are missing, make that message

11 Dec 20:08:12 ntpdate[13930]: insufficient permissions (suggestion: use sudo)

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ntpdate 1:4.2.8p4+dfsg-3ubuntu5.7
ProcVersionSignature: Ubuntu 4.4.0-103.126-generic 4.4.98
Uname: Linux 4.4.0-103-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.1-0ubuntu2.14
Architecture: amd64
CurrentDesktop: XFCE
Date: Mon Dec 11 17:53:23 2017
InstallationDate: Installed on 2016-08-08 (490 days ago)
InstallationMedia: Xubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: ntp
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Kevin O'Gorman (kogorman-pacbell) wrote :
Revision history for this message
Paul Gear (paulgear) wrote :

Hi @kogorman-pacbell,

Can you explain what you think should be happening here? Running ntpdate from sudo or a root shell gives exactly the same behaviour - ntpdate requires a list of servers to be provided on the command line, and it is simply indicating that this has not been provided.

In addition, it's completely legitimate to run ntpdate as a non-root user in order to see the offset from a remote server without setting the time (see the man page for details on the -d option).

Changed in ntp (Ubuntu):
status: New → Incomplete
Revision history for this message
Kevin O'Gorman (kogorman-pacbell) wrote : Re: [Bug 1737657] Re: Failure to be root is repored in a misleading message

On Tue, Dec 12, 2017 at 6:17 PM, Paul Gear <email address hidden> wrote:

> Hi @kogorman-pacbell,
>
> Can you explain what you think should be happening here? Running
> ntpdate from sudo or a root shell gives exactly the same behaviour -
> ntpdate requires a list of servers to be provided on the command line,
> and it is simply indicating that this has not been provided.
>

It is indicating in a round-about way. It should do so directly: "no
servers provided on the command line, or they are not usable".
That would be more clear, and for the clueless (like me) provide a clue as
to what is expected.

>
> In addition, it's completely legitimate to run ntpdate as a non-root
> user in order to see the offset from a remote server without setting the
> time (see the man page for details on the -d option).
>
> ** Changed in: ntp (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1737657
>
> Title:
> Failure to be root is repored in a misleading message
>
> Status in ntp package in Ubuntu:
> Incomplete
>
> Bug description:
> This is a feature request.
>
> When solving a problem or in a rush, I don't necessarily remember
> everything from a man page, or even think to read it. This is what
> happened with ntpdate(8)
>
> $ ntpdate
> 11 Dec 20:08:12 ntpdate[13930]: no servers can be used, exiting
> $
>
> Of course, I should have used sudo. And it's documented. But as I
> pointed out that doesn't help much when in a hurry or stressed. My
> bad, so I usually wouldn't mention it. But the fix is so simple I
> hope it appeals to you.
>
> -> test the permissions and if they are missing, make that message
>
> 11 Dec 20:08:12 ntpdate[13930]: insufficient permissions (suggestion:
> use sudo)
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: ntpdate 1:4.2.8p4+dfsg-3ubuntu5.7
> ProcVersionSignature: Ubuntu 4.4.0-103.126-generic 4.4.98
> Uname: Linux 4.4.0-103-generic x86_64
> NonfreeKernelModules: wl
> ApportVersion: 2.20.1-0ubuntu2.14
> Architecture: amd64
> CurrentDesktop: XFCE
> Date: Mon Dec 11 17:53:23 2017
> InstallationDate: Installed on 2016-08-08 (490 days ago)
> InstallationMedia: Xubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64
> (20160719)
> SourcePackage: ntp
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1737657/+subscriptions
>

--
Kevin O'Gorman
#define QUESTION ((bb) || (!bb)) /* Shakespeare */

Please consider the environment before printing this email.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ntp (Ubuntu) because there has been no activity for 60 days.]

Changed in ntp (Ubuntu):
status: Incomplete → Expired
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.