[systemd-devel] Reason for su command to be ignored in target?

Lennart Poettering lennart at poettering.net
Wed Apr 17 10:12:11 PDT 2013


On Wed, 17.04.13 12:22, Mark Hounschell (markh at compro.net) wrote:

> 
> On 04/17/2013 10:27 AM, Lennart Poettering wrote:
> >On Wed, 17.04.13 09:46, Mark Hounschell (markh at compro.net) wrote:
> >
> >>I have been using systemd to boot into a very basic target. That
> >>target basically executes a script. In that script we execute an "su
> >>-m -c command user". The last version of systemd I have where this
> >>worked is version 37. I'm using opensuse dist and that was in
> >>version 12.2 from about a year ago. I've upgraded to opensuse-12.3
> >>and that systemd version is 195. The "su -m -c command user" now
> >>appears to be ignored.
> >>
> >>I there a particular service I now need to include in my target that
> >>will enable the su command to work?
> >>
> >>I can post my target and service files if required.
> >
> >Have you checked the logs for anything interesting? That's a good way to
> >start figuring out what's going on...
> >
> 
> The only thing I see in /var/log/messages is:
> 
> 2013-04-17T11:36:51.667308-04:00 utils-linux su: (to lcrs) root on
> /dev/ttyS0

Bu that's run on ttyS0? Is that really script? How do spawn that script?

> 2013-04-17T11:36:51.668896-04:00 utils-linux systemd-logind[1731]:
> New session c4 of user lcrs.
> 2013-04-17T11:36:51.705945-04:00 utils-linux systemd-logind[1731]:
> Removed session c4.

if you invoke "logger test" via su here, do you see it logging
something?

Maybe your implementation of "su" is borked? Some older implementations
misused PAM and immediately closed the PAM session after creating
it... Which implementation do you use?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list