FS#35167 - postgresql groupadd not found when run under sudo
Attached to Project:
Arch Linux
Opened by Neale Swinnerton (sw1nn) - Thursday, 09 May 2013, 10:47 GMT
Last edited by Dave Reisner (falconindy) - Friday, 10 May 2013, 12:42 GMT
Opened by Neale Swinnerton (sw1nn) - Thursday, 09 May 2013, 10:47 GMT
Last edited by Dave Reisner (falconindy) - Friday, 10 May 2013, 12:42 GMT
|
Details
Description:
When installing postgresl via sudo, PATH does not include groupadd The necessary executables are installed, via the shadow package, but are not on the PATH when invoked via sudo. A similar problem occurs when removing the package via sudo if logged in as root, pacman -S postgresql completes without error. Additional info: postgresql-9.2.4-1 Steps to reproduce: -------------------------------------------- % pacman -Q shadow shadow 4.1.5.1-5 % sudo pacman -S postgresql resolving dependencies... looking for inter-conflicts... Packages (1): postgresql-9.2.4-1 Total Installed Size: 26.23 MiB :: Proceed with installation? [Y/n] (1/1) checking keys in keyring [######################] 100% (1/1) checking package integrity [######################] 100% (1/1) loading package files [######################] 100% (1/1) checking for file conflicts [######################] 100% (1/1) checking available disk space [######################] 100% (1/1) installing postgresql [######################] 100% /tmp/alpm_EF0UdJ/.INSTALL: line 6: groupadd: command not found /tmp/alpm_EF0UdJ/.INSTALL: line 9: useradd: command not found passwd: user 'postgres' does not exist error: command failed to execute correctly Optional dependencies for postgresql python2: for PL/Python support [installed] perl: for PL/Perl support [installed] tcl: for PL/Tcl support [installed] postgresql-old-upgrade: upgrade from previous major version using pg_upgrade ---------------------------------------------------------------- If I do the following, all is well... % sudo su - # pacman -S postgresql resolving dependencies... looking for inter-conflicts... Packages (1): postgresql-9.2.4-1 Total Installed Size: 26.23 MiB :: Proceed with installation? [Y/n] (1/1) checking keys in keyring [######################] 100% (1/1) checking package integrity [######################] 100% (1/1) loading package files [######################] 100% (1/1) checking for file conflicts [######################] 100% (1/1) checking available disk space [######################] 100% (1/1) installing postgresql [######################] 100% Optional dependencies for postgresql python2: for PL/Python support [installed] perl: for PL/Perl support [installed] tcl: for PL/Tcl support [installed] postgresql-old-upgrade: upgrade from previous major version using pg_upgrade |
This task depends upon
Closed by Dave Reisner (falconindy)
Friday, 10 May 2013, 12:42 GMT
Reason for closing: Not a bug
Additional comments about closing: Working as intended given the user's shell config.
Friday, 10 May 2013, 12:42 GMT
Reason for closing: Not a bug
Additional comments about closing: Working as intended given the user's shell config.
perhaps...
$ sudo bash -c 'echo $PATH'
Here's the PATH stuff...
sudo bash -c 'echo $PATH'
[sudo] password for neale:
/home/neale/bin:/home/neale/.rvm/bin:/opt/java/bin:/home/neale/bin:/home/neale/.rvm/bin:/opt/java/bin:/bin:/usr/bin:/usr/local/bin
sudo bash --login -c 'echo $PATH'
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/java/bin:/opt/java/db/bin:/opt/java/jre/bin:/usr/bin/vendor_perl:/usr/bin/core_perl
From the sudo man page for the benefit of others:
Note, however, that the actual PATH environment variable is not modified and is passed unchanged to the program that sudo executes.