Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] executing a command as a nologin user
Date: Wed, 13 Jul 2016 11:11:05
Message-Id: 578621B6.3080001@gmail.com
In Reply to: [gentoo-user] executing a command as a nologin user by jens w
1 On 12/07/2016 03:47, jens w wrote:
2 > .procmailrc
3 > :0 c
4 > * !^X-Loop: name@×××××××.com
5 > | formail -X "From:" | $HOME/bin/script.sh
6 >
7 > procmail.log
8 > procmail: Executing " formail -X "From:" | $HOME/bin/script.sh
9 >
10 > for incoming mail, a script is executed. logfile has the same entry as
11 > it is in other users. but the script do nothing.
12 >
13 > How executing a command as a nologin user?
14 >
15
16
17 You can't, not the way you are doing it.
18 You want to launch a shell script for the user, but the user's shell is
19 /sbin/nologin. This exits immediately without launching the script.
20
21 Give the user a real shell.
22
23 Alan

Replies

Subject Author
Re: [gentoo-user] executing a command as a nologin user Fernando Rodriguez <cyklonite@×××××.com>