All of our machines here access a directory server for most accounts, and have one local account (well, plus all of the standard ones)

The login screen only ever shows the one local account ('nadmin'), and, on the whole, won't show any other accounts.

What I want is to be able to have any recently logged in accounts to be shown on that screen.

Strangely, on a couple of machines, there is one other user shown, but I have no idea how they ended up there. It doesn't seem to be based around any kind of recent login.

Any idea how I can get this to work?

1 Answer 1


You question wasn't very clear, so just in case, I'd very much suggest NOT displaying that information prior to a successful login. Displaying that makes it just a bit easier for a black hat to figure out what usernames can be tried.

I would suggest displaying information after a successful login by adding

last | head -10
to your /home/UserName/.bashrc.

If you want it for all users, it ought to get in /etc/bashrc.

  • Of course, that's assuming a text terminal. If you're expecting it to appear in the GUI, I haven't the slightest idea how to do that.
    – Magellan
    Jan 15, 2012 at 20:36
  • Hi, Thanks for that. This is in the GUI (I believe the login screen is part of GDM). It's purely so that users can click on their username rather than having to type it in every time.
    – Hugh
    Jan 17, 2012 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.