Image

Imageanivair wrote in Imagelinux

Listens: Loretta - The Fire

utmp and wtmp redirect

So I finally have a question that isn't easy as pie.

On my work system our utmp and wtmp files don't clear out properly when someone logs off our system. This means that the next person logging on ends up as the previous user (not for all things, but for particular applications). According to tech support this is because we use digi ports to connect our dumb terminals so there's not much we can do about it (YMMV).

Problem. I have a situation where I need people to switch to another login pretty quickly. Not a problem, but when they successfully log in on our system they will still be in the utmp and wtmp files as their old selves first, so when they use our primary work application they will perform as if they had not logged off (which is to say not at all).

My best solution for this (apart from just solving the locked login problem) is to somehow redirect the logins of the people that I need to make this switch (maybe 12 people all on static ports) into different utmp and wtmp files. That way I can empty out those files before they log in so they have a clean slate without kicking everyone else off the system. (the best solution so far is clearing out the utmp and wtmp files completely to hard reset the system, but this converts everyone on the system to the generic "log" id).

umm. . . thoughts on accomplishing this or solving the initial problem?