Hi Terry,
I think that the problem is because the user tuptime have the shell
"/bin/sh" and the script spect an execution from "/bin/bash". Using "su
-" prevent any herietage from the execution user, in this case "root",
and normally, this user have the bash shell assigned.
I tried to find the "lcx_all_users_aliases.sh" script but I didn't found
anything from the offical repos. Please, can you pass me the content of
if? (maybe directly to my address if you have sensitive information).
Thanks,
El 2017-12-21 23:17, Terry Roy escribió:
Package: tuptime
Version: 3.3.1
Severity: important
Dear Maintainer,
*** Reporter, please consider answering these questions, where
appropriate ***
* What led up to the situation?
The install fails due to the inclusion of '-' in the postinst file.
Specifically, line 30 reads "su - tuptime -c "tuptime -x". The use of
the '-' causes full login shell exec to /bin/sh which was incompatible
with our /etc/profile.d files.
Removal of the '-' in postinst should fix the situation.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=875958 for
another
example of 'su -' causing a conflict with files in /etc/profile.d.
* What exactly did you do (or not do) that was effective (or
ineffective)?
I uninstalled tuptime, removed the files in /etc/profile.d, and
reinstalled successfully.
* What was the outcome of this action?
This fixed the problem.
Here are the relevant lines of the installation log showing the failed
installation:
The following NEW packages will be installed:
tuptime
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 22.4 kB of archives.
After this operation, 79.9 kB of additional disk space will be used.
Get:1 http://debian.osuosl.org/debian stretch/main amd64 tuptime amd64
3.3.1 [22.4 kB]
Fetched 22.4 kB in 0s (444 kB/s)
Selecting previously unselected package tuptime.
(Reading database ... 53052 files and directories currently installed.)
Preparing to unpack .../tuptime_3.3.1_amd64.deb ...
Unpacking tuptime (3.3.1) ...
Setting up tuptime (3.3.1) ...
adding tuptime user...
-su: 19: /etc/profile.d/lcx_all_users_aliases.sh: Syntax error: "("
unexpected
dpkg: error processing package tuptime (--configure):
subprocess installed post-installation script returned error exit
status 2
Processing triggers for systemd (232-25+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
tuptime
-- System Information:
Debian Release: 9.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.68-x86_64-linode89 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages tuptime depends on:
ii adduser 3.115
ii init-system-helpers 1.48
ii lsb-base 9.20161125
ii python 2.7.13-2
tuptime recommends no packages.
tuptime suggests no packages.