Failure to be root is repored in a misleading message
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+
ProcVersionSign
Uname: Linux 4.4.0-103-generic x86_64
NonfreeKernelMo
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)
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).