Displaying Active Users
Problem
You want to find out who else is logged in to a router.
Solution
To see which users are currently logged into the router and on which line, use the show users EXEC command:
Router1#show users
Use the keyword all to view all lines whether a user is currently active or not:
Router1#show users all
Use the EXEC command who to view the same output as the show users command:
Router1#who
To remotely view which users are logged into a router, use the finger command from your management server:
Freebsd%finger @
Router1
This last command will work only if the finger service is enabled on the router.
Discussion
The router provides a number of different methods to view active users. The output from all of these commands is nearly identical. For security purposes, for operational reasons, or just for curiosity, many administrators like to know which users are accessing the router.
The format of the output is as follows: the absolute line
number, the VTY line number, the username, listing of connected hosts,
the inactivity timer, and the source address of the session. Also
notice that one line of the output has an asterisk *
in the left margin, indicating your
current session.
The show users command displays the current active users and their associated line information:
Router1#show users
Line User Host(s) Idle Location 66 vty 0 ijbrown idle 00:56:15 freebsd.oreilly.com 67 vty 1 kdooley idle 00:17:52 freebsd.oreilly.com * 68 vty 2 weak idle 00:00:00 freebsd.oreilly.com Interface ...
Get Cisco IOS Cookbook, 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.