# User accounting database issue



## elpek (Sep 4, 2014)

Hello,

During the daily system (FreeBSD 9.2) checks I noticed a strange behaviour of the user accounting database:


```
% last
[...]
admin      pts/30   10.16.0.4             Wed Sep  3 08:59 - 08:59  (00:00)
admin      pts/30   10.16.0.4             Wed Sep  3 08:59 - 08:59  (00:00)
admin      pts/30   10.16.0.4             Wed Sep  3 08:59 - 08:59  (00:00)
admin      pts/30   10.16.0.4             Wed Sep  3 08:59 - 08:59  (00:00)
admin      pts/30   10.16.0.4             Wed Sep  3 08:59 - 08:59  (00:00)
admin      pts/30   10.16.0.4             Wed Sep  3 08:59 - 08:59  (00:00)
admin      pts/30   10.16.0.4             Wed Sep  3 08:59 - 08:59  (00:00)
[...]
```

As in the above the entry for an "admin" user is repeated multiple times - all of the login details are the same. There are also many other entries I find correct. What might be a cause of a problem? Corrupted user accounting database?


----------



## talsamon (Sep 4, 2014)

You can look in the account database with  `getent utmpx active`.

May be this can help:


```
man utxrm
The utxrm utility can be used to remove stale sessions from the user
     accounting database, by referring to their identifier.  Stale sessions
     can occur if a login service exits prematurely or fails to remove the
     session from the accounting database.
```


----------

