Forgot the username

0

I have fedora installed in my system. I know the password but i forgot the user name. I can access through terminal but i don't no how to login through gui. Please help me.

prithviraj

Posted 2010-03-24T04:22:10.860

Reputation:

Answers

2

With cat /etc/passwd you can see all the users on the system. With id you can see what your current user/group is.

Wolph

Posted 2010-03-24T04:22:10.860

Reputation: 595

No, /etc/passwd may well not contain the account, and may not be used at all on some systems. – bignose – 2010-03-24T06:43:56.723

Unless the user is using network authentication exclusively, the /etc/passwd file will show all local users in Fedora. – TuxRug – 2011-04-20T05:43:39.007

@bignose: true enough. My answer is not valid for all unix/linux systems and depends on the rest of your config. But with a normal fresh install of fedora, it usually holds ;) – Wolph – 2011-04-20T09:09:12.233

@TuxRug: indeed, but I wouldn't expect that from an out-of-the-box fedora install – Wolph – 2011-04-20T09:09:38.630

2

Use getent passwd to see all accounts that exist on the host.

Use who to see which accounts are currently logged in to a terminal on the host.

Use id to see which account owns the current shell process.

bignose

Posted 2010-03-24T04:22:10.860

Reputation: 1 981

I did not know about the getent and id commands. I'll have to try them next time I'm on my linux system. – TuxRug – 2011-04-20T06:02:20.073