On Mon, 7 Nov 2016 08:57:58 -0800 Francois Marier <franc...@debian.org> wrote: > On 2016-11-06 at 10:09:21, Jack.R wrote: > > I start to suspect a right access as that part is executed as > > email-reminder user. > > > > So I try with a normal user by putting > > my $distro = `/bin/su - alain -s /bin/sh -c "/usr/bin/lsb_release -s > > -d"`; > > I am prompt for the password and then it works. > > It looks like email-reminder user has not sufficient rights to > > run /usr/bin/lsb_release without error but currently I did not see > > why. > > What about this then? > > my $distro = `/bin/su - email-reminder -s /bin/sh -c > "/usr/bin/lsb_release -s -d"`; > > Francois >
I am prompted for the password of email-reminder account and this one is locked (! in second field of shadow file). If I add a password to that account and unlock it, $distro is still empty --> {} <-- instead of getting the version like when I use a normal user account: --> {Debian GNU/Linux testing (stretch) } <-- Code has been modified as follow for testing: my $distro = `/bin/su - email-reminder -s /bin/sh -c "/usr/bin/lsb_release -s -d"`; print "--> {$distro} <--"; chomp $distro; -- Jack.R