[systemd-devel] Why doe I not see the logging with -u

Lennart Poettering lennart at poettering.net
Sun Dec 15 16:03:17 PST 2013


On Mon, 16.12.13 00:41, Lennart Poettering (lennart at poettering.net) wrote:

> On Sat, 14.12.13 09:22, Cecil Westerhof (Cecil.Westerhof at Snow.nl) wrote:
> 
> > I made a first setup to make a service for the H2 database. I made
> > the folowing service file:
> >     [Unit]
> >     Description=H2 Database
> > 
> >     [Service]
> >     Type=simple
> >     ExecStart=/usr/bin/java -cp
> > /home/cecil/java/h2/bin/h2-1.3.174.jar org.h2.tools.Console -tool
> > -tcp
> >     Restart=always
> >     User=cecil
> 
> Note that "journal -u" only shows you the journal files that have been
> split off for the calling user. How this splitting up takes place is
> configured via SplitMode= in journald.conf. The default of this value is
> "login", which means only data generated from login sessions are split
> out, but not data that is just generated from a non-zero UID. A login
> session is here defined by whether we went though the PAM session hooks
> or not. The PAM session hooks have the effect that pam_limits and
> suchlike are applied too, which is usually what you want when you run
> some service as real user (i.e. where "real" user means not just as a
> system user like "httpd" or "mysql", but as somebody who actually logs
> in via ssh from time to time). Now, by just using User=cecil you simply
> change user IDs, but you do not open a full PAM session. To get a full
> PAM session define PAMName= for a service.

Oh, sorry, ignore all I wrote above. It's irrelevant for your case. As
Zbigniew just pointed out to me "-u" is short for --unit= not for --user
as I somehow mistakenly assummed...

Sorry for the confusion,

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list