Allow user to restart Polarion (Changed License Assignment)

Description
mmarte
Posts: 2
Joined: Thu May 20, 2010 9:51 am

Allow user to restart Polarion (Changed License Assignment)

Postby mmarte » Thu May 20, 2010 10:00 am

Hello,

what is the recommended method to allow user to restart Polarion after changing the license assignment.
In our worksplit, it is necessary that non-root user are able to change the license assignment of Polarion and
as far as I know it is necessary to restart Polarion after altering the /opt/polarion/polarion/license/users
file.

I tried to add the user to the sudo-file, that they can execute /etc/init.d/polarion as root, but this wasn't
sucessful.

I'm looking forward for you suggestions.

Thanks in advance,
Matthias

ChernikovaEkaterina
Posts: 15
Joined: Mon Dec 07, 2009 9:08 pm

Re: Allow user to restart Polarion (Changed License Assignment)

Postby ChernikovaEkaterina » Wed May 26, 2010 4:12 pm

Dear Matthias,

1) Add to sudoers possibility for user(s) to restart Polarion service (as you suggested)
2) Append to /opt/polarion/etc/config.sh at lines 23,24 the following:

*# fix for user(s) restarts of Polarion*
*export PATH=$PATH:/sbin*

Our init scripts uses */sbin/runuser *utility to jailbreak Polarion java
virtual machine to run under user "polarion" . Standard users do not have
in their enviroment PATH to /sbin location set , and init script fails when
unable to locate runuser command.

Best Regards,
Ekaterina Chernikova
Support Polarion Software

mmarte
Posts: 2
Joined: Thu May 20, 2010 9:51 am

Re: Allow user to restart Polarion (Changed License Assignment)

Postby mmarte » Thu May 27, 2010 9:33 am

Dear Ekaterina,

thanks for your tip. It works now, but I like to hear your opinion about my realization.

I added these entries to /etc/sudoers (mmarte is a regular user):

Code: Select all

mmarte ALL=/etc/init.d/polarion, /bin/env
mmarte ALL=(polarion) /bin/vi


- The first entry is to have root permissions for the polarion startup-script.
- The second one, is to be able to manipulte the PATH-Environment variable. That is needed to have /sbin in the PATH (for runuser).
- The third one, is to be able to edit the license-assignment-file /opt/polarion/polarion/license/users.

A authorized user need to execute the steps below, if he want's to change license assignment:
- Logon to polairon-server via ssh-client
- Edit the license assignment file with this command:

Code: Select all

sudo -u polarion vi /opt/polarion/polarion/license/users

- Restart Polarion:

Code: Select all

sudo env PATH=$PATH:/sbin /etc/init.d/polarion restart


Best Regards,
Matthias

hlacikd
Posts: 3
Joined: Wed Apr 16, 2008 5:42 pm
Location: Prague

Re: Allow user to restart Polarion (Changed License Assignment)

Postby hlacikd » Thu Jun 03, 2010 12:47 pm

Hello Matthias,

Your solution is correct and elegant as well.

Have a nice day,

David Hlacik
Polarion Software IT dep.


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 10 guests