+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    Apr 2004
    Location
    Michigan
    Posts
    63

    Certifications
    MCSE in Server 2012, VMware VCAP, CISSP, Security+, CCNA
    #1

    Default VTY user disconnected?

    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?
    Reply With Quote Quote  

  2. SS -->
  3. They are watching you NetworkNewb's Avatar
    Join Date
    Feb 2015
    Location
    Off the grid
    Posts
    2,550

    Certifications
    A+/Net+/Sec+, CCENT, CCNA:Sec, CCSK, GCIH
    #2
    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
    Reply With Quote Quote  

  4. Member
    Join Date
    Apr 2004
    Location
    Michigan
    Posts
    63

    Certifications
    MCSE in Server 2012, VMware VCAP, CISSP, Security+, CCNA
    #3
    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?
    Reply With Quote Quote  

  5. Junior Member greeneon's Avatar
    Join Date
    Aug 2009
    Posts
    23
    #4
    It will run the show users command after login and then disconnect the user.
    Reply With Quote Quote  

  6. Senior Member
    Join Date
    Sep 2014
    Location
    Minnesota
    Posts
    757

    Certifications
    CCNA:R&S, VCA6-DCV, Sec+
    #5
    Quote Originally Posted by AMD4EVER View Post
    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.
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks