Enhancements.

From: Kevin P Tomlinson (Tomlinson_Kevin_P_at_cat.com)
Date: 10/01/04

  • Next message: Ian Gallagher: "Re: scp encryption"
    To: secureshell@securityfocus.com
    Date: Fri, 1 Oct 2004 08:22:41 +0100
    
    

    All,

    wanted to control 1000 users logging on to a Tru64 box without the need to
    generate 1000 keys and use the force commands option.
    We needed the users to logon onto the box but did not want all of them to
    be able to run commands. Checked the documentation for Openssh
    and various other sources and could not find a way of controlling this
    without keys.

    Looked at the latest source 3.9p1 source and made changes to session.c to
    allow us to control this thru the system sshrc file.

    # sshrc

    # SSH_SHELL_COMMAND - shell command the user is attempting to run. Not
    set
    # if user is running interactive login.
    # SSH_PARENT - PID of the sshd connection process.
    #
    # These parameters are set with Kevin Tomlinsons Patch to session.c

    # Check to see if this user is running a command
    if [ "${SSH_SHELL_COMMAND}" ]
    then case ${SSH_SHELL_COMMAND} in
         /bin/ls*) :;; # Allow LS commands
         *) echo "Security Violation. Session Terminated" >&2
                    kill -15 ${SSH_PARENT};; # Dont allow commands
         esac
    fi
    exit 0

    Not sure where to post this patch or if its of any use to anyone else but
    would like to share.

    Thanks

    Kevin Tomlinson
    UNIX Enterprise Consultant
    RHCE - RedHat Certified Engineer.
    HCE - Hewlett Packard Certified Engineer.
    Solaris - Certified Administrator , Certified Network Administrator ,
    Certified Security Administrator.
    ktomlinson@scarpgold.co.uk


  • Next message: Ian Gallagher: "Re: scp encryption"

    Relevant Pages

    • Re: Linux text editors
      ... The basic commands were pretty intuitive. ... > maybe one or two function keys. ... and only one Control key on the left. ... That's where I first used emacs. ...
      (Fedora)
    • Re: Suggestions for X10/Automation Widgets
      ... >X-Lock" by Jeff Mazur that was along the lines of what The Alien is ... It listened to the powerline and, when it heard an alien X-10 ... >Insteon only responds to commands sent from devices that have been ... You need physical control of a device to enroll ...
      (comp.home.automation)
    • Re: RS232 Datalogging and Control
      ... digital voltmeter, both RS232 enabled, so as to control the oven from a ... computer (automatically send commands) and log data from the ... to control the oven and log data from the DVM without ...
      (sci.electronics.design)
    • Re: Temporal Learning
      ... It's all C++ real time control code sends a constant stream of ... commands to the joints as well as receive real time updates from the ... I never saw a clear description of what the lowest level commands you could ...
      (comp.ai.philosophy)
    • Re: z series channel commands
      ... From the subject of your post, "z series channel commands,", the literal ... You need to determine the control unit model number that supports whatever ...
      (bit.listserv.ibm-main)