Logging in is a user-space construct; the kernel doesn’t care about that.
There are multiple examples of this; for example, cron jobs can run as any user, without that user being logged in. ... connecting using SSH counts as logging in.
Since there are examples which have and which don't have logging in, may I ask what logging in is? What activities counts as logging in and what not?
Let me guess. Is any activity involving asking for user name and its password, and checking that information in
/etc/shadow counted as logging in? Otherwise, not logging in?
su logging in?
sudo logging in? Or not, because it doesn't ask for the target user's password?
What are some other educational examples?