how to see active users

Discussion in 'all things UNIX' started by lurningcerv, Jun 12, 2014.

Thread Status:
Not open for further replies.
  1. lurningcerv

    lurningcerv Registered Member

    Joined:
    Dec 27, 2011
    Posts:
    87
    I have a dual boot W7/Ubuntu laptop.

    First question: My understanding is that some software creates a username for itself and that user somehow becomes an active user when the console user executes the software. So if user "y" at the console executes "program a", then program a may be able to execute as user "program a". Is this correct? If not, what am I misunderstanding?

    Second question: How can I see what users are currently active on my machine? Ubuntu shows the active console user in the upper left corner, but is it possible there are other users?

    I would like to know the answers to the same question for W7, maybe I'll ask it in another forum.
     
  2. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,677
    Location:
    George, S.Africa
    In terminal:-
    last -nX where X is a number (eg. last -n6)
     
  3. lotuseclat79

    lotuseclat79 Registered Member

    Joined:
    Jun 16, 2005
    Posts:
    5,101
    Hi lurningcerv,

    In Ubuntu/Linux use the id command to print real and effective user and group IDs of active users. Read the man page for the command id: man id

    -- Tom
     
  4. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    6,030
    The goal in this is often running apps with limited privileges, directory access, etc. For example, OpenVPN needs to start as root, in order to change network configuration, but then drops to user nobody, with very limited privileges.
     
Loading...
Thread Status:
Not open for further replies.