[MCOL-336] MCOL post-install asks for root password in non-root install on RHEL 7 Created: 2016-09-28  Updated: 2016-11-29  Resolved: 2016-11-29

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: 1.0.3
Fix Version/s: 1.0.5

Type: Bug Priority: Major
Reporter: Nivesh Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

Redhat Enterprise Linux 7.2 (Maipo)


Issue Links:
PartOf
is part of MCOL-280 Beta issues Closed
Sprint: 2016-19, 2016-20, 2016-21, 2016-22, 2016-23

 Description   

When running post-install as non-root user the system prompts for a root user on Redhat enterprise Linux 7.2



 Comments   
Comment by David Hill (Inactive) [ 2016-09-29 ]

nivij I believe the /etc/sudoers file isn't setup correctly. Make sure that the /etc/sudoers file is setup with the following, with 'quest' in the example as the non-root user name

guest ALL=(ALL) NOPASSWD: ALL

The document below was in correct and I updated it with the above information from the "Non-Root User Installs" section:

[ https://mariadb.com/kb/en/mariadb/preparing-for-installation

http://example.com]
Comment by Nivesh [ 2016-10-04 ]

I've set the sudo priviledges as
________________________________________________

    1. Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
      #includedir /etc/sudoers.d
      mariadb ALL=(ALL) NOPASSWD: ALL
      ________________________________________________

however I still get the below when running
/home/mariadb/mariadb/columnstore/bin/post-install --installdir=/home/mariadb/mariadb/columnstore/

______________________________________________________
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ===
Authentication is required to manage system service or unit files.
Authenticating as: root
Password:
______________________________________________________
______________________________________________________

Comment by David Hill (Inactive) [ 2016-10-04 ]

Ok, that is something a bit different... Looks like there is a call being made to some system service, like netctl, that the post-install script isn't expecting..

Please do the following. this should show us where in the script this is occurring:

NOTE: the last '/' shouldn't be entered. This is happening, most likely, because you used a 'tab' key to enter the directory

  1. bash -x /home/mariadb/mariadb/columnstore/bin/post-install --installdir=/home/mariadb/mariadb/columnstore

1. Lets see if this works, by removing the '/'
2. Or this will tell us where in the script its calling a system service command that is requiring the password. Please provide the output of the command, if this is the case.

Thanks, David Hill

Comment by David Hill (Inactive) [ 2016-10-04 ]

reopen

Comment by Nivesh [ 2016-10-05 ]

Hi David.

at line 168 of the post-install there is a missing sudo.
redhat 7 requires root priviledges to execute systemctl.

screen below.

+ sudo cp /home/mariadb/mariadb/columnstore/bin/columnstore.service /lib/systemd/system/.
+ systemctl enable columnstore
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ===
Authentication is required to manage system service or unit files.
Authenticating as: root
Password: + '[' mariadb = root ']'

Comment by David Hill (Inactive) [ 2016-10-05 ]

Thanks, good catch.... We will get that corrected in for next release....

Comment by David Hill (Inactive) [ 2016-10-05 ]

fixed with changes to post-install and pre-uninstall.

just added the sudo command where systemctl is called

Comment by David Hill (Inactive) [ 2016-10-05 ]

Please review, another 1 line change to post-install and pre-uninstall...

Comment by Ben Thompson (Inactive) [ 2016-10-10 ]

Review changes in 2 files.

Comment by David Thompson (Inactive) [ 2016-11-29 ]

This would have been fixed and tested as part of 1.0.5 since non root install was correctly working and tested.

Generated at Thu Feb 08 02:20:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.