VTY user disconnected?

AMD4EVERAMD4EVER Member Posts: 64 ■■□□□□□□□□
This is a question from Boson that I don't understand even after reading their explanation. Hoping someone can help.

The following commands are run on a cisco router:

privilege exec level 10 show users
username boson password cisco
username boson privilege 15
username boson autocommand show users
line vty 0 4
login local
privilege level 7

The question is, what happens when the user successfully initiates a telnet session?

The answer they provide is that the autocommand command succeeds and then the user is disconnected.

I understand why the autocommand succeeds but no idea why the user is disconnected. The explanation states that the nohangup keyword has to be used with the username command to prevent this disconnect from occurring. Anyone know why this would be?

Comments

  • NetworkNewbNetworkNewb Member Posts: 3,298 ■■■■■■■■■□
    because from what I've read that is how "autocommand" works. It runs the command, then disconnects. Unless you configure the username user nohangup option
  • AMD4EVERAMD4EVER Member Posts: 64 ■■□□□□□□□□
    Wow, what a bizarre function. Under what circumstance is it useful to have that happen? In my uninformed option, it would make more sense to have an optional "hangup" option than a "nohangup", right?
  • greeneongreeneon Member Posts: 40 ■■■□□□□□□□
    It will run the show users command after login and then disconnect the user.
  • clarsonclarson Member Posts: 903 ■■■■□□□□□□
    AMD4EVER wrote: »
    Wow, what a bizarre function. Under what circumstance is it useful to have that happen? In my uninformed option, it would make more sense to have an optional "hangup" option than a "nohangup", right?
    Well those of you with more of a linux/unix backgroup, probably notice a definite unix flavor to the cisco commands. So, i would guess that is quite a bit of that the cisco ios has borrowed from unix. And, in unix, nohup is a POSIX command to ignore the HUP (hangup) signal. So, I would guess that the nohup is keeping the user session going beyond where it would have usually ended.
Sign In or Register to comment.