Unable to set a number with a fractional part as the value to the timestamp_timeout option in /etc/sudoers when using Italian locale (possibly other locales will be affected as well)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sudo (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
% lsb_release -rd
Description: Ubuntu 15.10
Release: 15.10
% apt-cache policy sudo
sudo:
Installed: 1.8.12-1ubuntu3
Candidate: 1.8.12-1ubuntu3
Version table:
*** 1.8.12-1ubuntu3 0
500 http://
100 /var/lib/
---
When using Italian locale (possibly other locales will be affected as well), setting a number with a fractional part as the value to the timestamp_timeout option in /etc/sudoers makes sudo complain about it, not honor the desired timeout and behave as if timestamp_timeout wasn't set at all: after the expiration of the first timestamp sudo stops complaining about it, but the desired timeout is still not honored.
% sudo sleep 1
sudo: value `2.5' is invalid for option `timestamp_timeout'
% sudo -l
sudo: value `2.5' is invalid for option `timestamp_timeout'
Matching Defaults entries for user on user-X550CL:
env_reset, timestamp_
secure_
User user may run the following commands on user-X550CL:
(ALL : ALL) ALL
ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: sudo 1.8.12-1ubuntu3
ProcVersionSign
Uname: Linux 4.2.0-16-generic x86_64
NonfreeKernelMo
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: GNOME
Date: Sat Mar 26 23:36:41 2016
InstallationDate: Installed on 2016-02-16 (39 days ago)
InstallationMedia: Ubuntu-GNOME 15.10 "Wily Werewolf" - Release amd64 (20151021)
ProcEnviron:
TERM=xterm-
PATH=(custom, no username)
XDG_RUNTIME_
LANG=it_IT.UTF-8
SHELL=/usr/bin/zsh
SourcePackage: sudo
UpgradeStatus: No upgrade log present (probably fresh install)
VisudoCheck:
/etc/sudoers: parsed OK
/etc/sudoers.
modified.
modified.
Ok, the issue seems to be related to the locale in use.
Namely this seems to be happening when using Italian locale (possibly other locales will be affected as well), where commas (as opposed to dots) are used to separate the decimal part of a figure.
Booting the ISOs of Trusty / Unity, Wily / Unity and Wily / GNOME choosing Italian as the language the issue is always present, while booting choosing English as the language the issue is never present.
So to reproduce: simply boot one of the Trusty / Unity, Wily / Unity or Wily / GNOME ISOs (most likely all other ISOs will be affected as well) choosing Italian as the language, open Terminal, run sudo visudo, add a line "Defaults timestamp_ timeout= 2.5", save, exit and try to run a sudo command (e.g. sudo -l).