Checking Who's on the Router

More than one person can log in to a Juniper router at any given time, logging in either with an individual user account name or with a group name that is shared by many users. (An example of a group account is root.) Each person who is on the router can perform whatever operations they're allowed, depending on their privileges (see Chapter 7 for more on logging in and log in status), and it's possible that another person's work may interfere with what you're doing.

Knowing who's logged in

When you log in to the router, the CLI doesn't tell you whether anyone else is already logged in. You need to check manually:

fred@router> show system users

If you discover that an unwanted user is logged into the router or if you need to perform an operation, such as rebooting the router or installing new software, that would be easier if no one else were logged in to the router, you can forcibly log people out. The show system users command shows you the names of users who are logged in. Use the name to forcibly log the person out, in this case Mike:

fred@router> request system logout mike

Now, Mike sees the following on his terminal window:

mike@router> Connection closed by foreign host.
[server.mycompany.com] mike@server%

You can also ask people to log out. You can ask an individual with a command like this one, with any message you want:

fred@router> request message user mike message “End router session now!”

You can also have the message go to everyone ...

Get Junos® OS For Dummies®, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.