Gentoo Archives: gentoo-user

From: jens w <jw@××××××.eu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] executing a command as a nologin user
Date: Tue, 12 Jul 2016 21:51:55
Message-Id: 20160712235144.00004fdc@lxsbbs.eu
In Reply to: Re: [gentoo-user] executing a command as a nologin user by Neil Bothwick
1 Am Tue, 12 Jul 2016 21:54:46 +0100
2 schrieb Neil Bothwick <neil@××××××××××.uk>:
3
4 > On Tue, 12 Jul 2016 22:39:59 +0200, jens w wrote:
5 >
6 > > > > .procmailrc
7 > > > > :0 c
8 > > > > * !^X-Loop: name@×××××××.com
9 > > > > | formail -X "From:" | $HOME/bin/script.sh
10 > > > >
11 > > > > procmail.log
12 > > > > procmail: Executing " formail -X "From:" | $HOME/bin/script.sh
13 > > > >
14 > > > > for incoming mail, a script is executed. logfile has the same
15 > > > > entry as it is in other users. but the script do nothing.
16 > > > >
17 > > > > How executing a command as a nologin user?
18 > > >
19 > > > Is script.sh readable and executable for the procmail user?
20 > > >
21 > > > Does script.sh contain a definition for a command interpreter
22 > > > (something like #!/bin/sh)?
23 > >
24 > > yes and yes.
25 > > it works for default user. it does not work for nologin user.
26 > > as workaround I forward the mail to a helper-user, and process it
27 > > there
28 >
29 > So you have copies of the same script in each user's $HOME/bin? Why
30 > not call them from a single location? Are you sure the scripts are
31 > identical?
32
33 is one user, i will send an alert.
34
35 >
36 > Does the procmail log give any clues?
37 >
38 >
39
40 same entry default / nologin user. see above.