Hi, when i create a run program action, i can choose "run as" option to specify a user to run. <runprogram> <program>tar</program> <programarguments>-xzmf /tmp/dbinstall/MySQL-advanced-sles10.x86_64.tar.gz -C /opt/mysql</programarguments> <progresstext>${msg(Installer.Progress.unpackingDatabase.info)}</progresstext> <runas>mysqluser</runas> <onerroractionlist> <setinstallervariable> <name>needrollbackdbfiles</name> <value>true</value> </setinstallervariable> <logmessage> <text>fail to uncompress database package</text> </logmessage> </onerroractionlist> </runprogram>

i found the actual realize of this action is "su - mysqluser -c '...'" .but if i don't want the mysqluser has the log in priviledge, i need to set the initial shell for mysqluser to /bin/false and run the program using "su - mysqluser -s /bin/bash -c '...'" . how can i do that with "run as" option?

asked 03 Feb '13, 22:35

laiyongyong's gravatar image

laiyongyong
1131314
accept rate: 0%


It is not possible with the <runas> option. However, you can simply just run the su command manually - i.e. specify

<runProgram> <program>su</program> <programArguments>- mysqluser -s /bin/bash -c "tar -xzmf /tmp/dbinstall/MySQL-advanced-sles10.x86_64.tar.gz -C /opt/mysql"</programArguments> <progressText>${msg(Installer.Progress.unpackingDatabase.info)}</progressText> <onErrorActionList> <setInstallerVariable> <name>needrollbackdbfiles</name> <value>true</value> </setInstallerVariable> <logMessage> <text>fail to uncompress database package</text> </logMessage> </onErrorActionList> </runProgram>

link

answered 04 Feb '13, 11:48

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×55

Asked: 03 Feb '13, 22:35

Seen: 957 times

Last updated: 04 Feb '13, 11:48