Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

migrated from serverfault.com Jan 15 '12 at 21:36

This question came from our site for professional system and network administrators.

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.

share|improve this answer
    
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 '12 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 '12 at 11:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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