--- util-linux-ng-2.17.2/login-utils/login.c.orig 2010-03-18 23:11:23.000000000 +0100 +++ util-linux-ng-2.17.2/login-utils/login.c 2010-05-09 11:42:42.890935908 +0200 @@ -1431,7 +1431,7 @@ struct lastlog ll; int fd; - if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) { + if ((fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0)) >= 0) { lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET); if (!quiet) { if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) &&