Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in srvrpowerctrl-setup.sh, line 167 #1

Open
epoch1970 opened this issue Jun 15, 2016 · 0 comments
Open

Bug in srvrpowerctrl-setup.sh, line 167 #1

epoch1970 opened this issue Jun 15, 2016 · 0 comments

Comments

@epoch1970
Copy link

epoch1970 commented Jun 15, 2016

$ uname -a
Linux montreux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.3 (jessie)
Release: 8.3
Codename: jessie

Line 167 in the setup script:
SLIMUSERID=$(ps -fp "$SLIMSERVICEPID" | grep -v 'UID' | sed -n -e 's/^([[:alnum:]])[[:blank:]].*$/\1/p')
fails to capture the entire user name (that prints as "squeeze+" on my system), then fails further validation and ends undefined.

Consequence: corrupted sudoers file with username missing from the new entries added by the script.

I corrected the issue replacing the line with:
SLIMUSERID=$(ps o user:25= "$SLIMSERVICEPID")

HTH

mavit added a commit to mavit/SrvrPowerCtrl that referenced this issue Apr 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant