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.

2 Answers 2

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.

4
  • No, /etc/passwd may well not contain the account, and may not be used at all on some systems.
    – bignose
    Mar 24, 2010 at 6:43
  • Unless the user is using network authentication exclusively, the /etc/passwd file will show all local users in Fedora.
    – TuxRug
    Apr 20, 2011 at 5:43
  • @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
    Apr 20, 2011 at 9:09
  • @TuxRug: indeed, but I wouldn't expect that from an out-of-the-box fedora install
    – Wolph
    Apr 20, 2011 at 9:09
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.

1
  • 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
    Apr 20, 2011 at 6:02

You must log in to answer this question.