Re: Maintainer scripts: execute command as another user: use sudo or su?

2014-03-02 Thread Emilien Klein
2014-03-02 0:41 GMT+01:00 gregor herrmann gre...@debian.org: On Sat, 01 Mar 2014 22:55:20 +0100, Emilien Klein wrote: One minor challenge that I faced is that I couldn't get the commands to run using su. With the help of Karsten Hilbert I understood that the issue was that the user being a

Re: Maintainer scripts: execute command as another user: use sudo or su?

2014-03-01 Thread Emilien Klein
On 02/27/2014 03:37 PM, David Kalnischkies wrote: On Wed, Feb 26, 2014 at 04:07:35PM +0100, Emilien Klein wrote: In the pre- and postinst scripts, a command has to be performed as that user (e.g. make a backup of the database). […] I am wondering what the best way is to fix this. I see 2

Re: Maintainer scripts: execute command as another user: use sudo or su?

2014-03-01 Thread gregor herrmann
On Sat, 01 Mar 2014 22:55:20 +0100, Emilien Klein wrote: One minor challenge that I faced is that I couldn't get the commands to run using su. With the help of Karsten Hilbert I understood that the issue was that the user being a system user, she didn't have a shell (default shell for new

Re: Maintainer scripts: execute command as another user: use sudo or su?

2014-02-27 Thread David Kalnischkies
On Wed, Feb 26, 2014 at 04:07:35PM +0100, Emilien Klein wrote: In the pre- and postinst scripts, a command has to be performed as that user (e.g. make a backup of the database). […] I am wondering what the best way is to fix this. I see 2 solutions: 1. Depend on sudo 2. Use su --command

Maintainer scripts: execute command as another user: use sudo or su?

2014-02-26 Thread Emilien Klein
Hi Mentors, TLDR: in order to execute a command as another user, should `sudo` or `su --command` be used? I'd like to get your opinion on how to best solve this issue: I've got a package [0] that uses dbconfig-common to manage its database. The database is owned by a specific user (not root).

Re: Maintainer scripts: execute command as another user: use sudo or su?

2014-02-26 Thread Thibaut Paumard
Le 26/02/2014 16:07, Emilien Klein a écrit : Hi Mentors, TLDR: in order to execute a command as another user, should `sudo` or `su --command` be used? I'd like to get your opinion on how to best solve this issue: I've got a package [0] that uses dbconfig-common to manage its database.

Re: Maintainer scripts: execute command as another user: use sudo or su?

2014-02-26 Thread Russ Allbery
Emilien Klein emil...@klein.st writes: TLDR: in order to execute a command as another user, should `sudo` or `su --command` be used? su. You don't want to depend on sudo to ensure that it's available, since package users may not want sudo installed on their systems. (I tend not to install it