diff -up util-linux-2.21-rc1/login-utils/login.c.kzak util-linux-2.21-rc1/login-utils/login.c
--- util-linux-2.21-rc1/login-utils/login.c.kzak	2012-01-19 13:19:54.886299587 +0100
+++ util-linux-2.21-rc1/login-utils/login.c	2012-01-19 13:20:40.853451212 +0100
@@ -499,7 +499,7 @@ static void log_lastlog(struct login_con
	if (!cxt->pwd)
		return;

-	fd = open(_PATH_LASTLOG, O_RDWR, 0);
+	fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
	if (fd < 0)
		return;
