Running csh script after ftp via W2K

From: Tom Linden (tom_at_kednos.com)
Date: 02/18/05

  • Next message: Reiner Dassing: "cannot read from serial device /dev/tty00"
    Date: Fri, 18 Feb 2005 08:18:38 -0800
    To: Tru64 <tru64-unix-managers@ornl.gov>
    
    

    I had to poer up a 4.0d machine and discovered
    that the license paks had expired. Logged in as
    root and transferred the license pak file
    My login shell is bash so I run the script as
    root> /bin/csh pak.txt
    then^M: Command not found.

    but there seems to be a problem recognizing end of line.

    When I dump the file I can see the lines are terminated
    with cr nl ( OX0d 0X0a or ^J ^M )

    When I read the file with emacs and search for ^M none is
    found, but ^J is.

    How should the lines be terminated for the csh?

    I guess ^J. Any tips for stripping out the ^M?

    The first few lines of the file start

    #!/bin/csh
    #
    # *******************************************************************
    # Issued by the License Key Management Group
    # Nashua - New Hampshire - USA
    # *******************************************************************
    #
    if `whoami` != "root" then
       echo "You must be superuser to run this script"
       exit 1
    endif

    test -r /etc/lmf
    if ($status != 0) then
       set lmfcom="/usr/sbin/lmf"
    else
       set lmfcom="/etc/lmf"
    endif

    echo ""


  • Next message: Reiner Dassing: "cannot read from serial device /dev/tty00"

    Relevant Pages

    • IBM Informix Web DataBlade: Local root by design
      ... IBM Informix Web DataBlade: Local root by design ... Impact: Any user who can: 1) Save a Perl script anywhere on the server's ... admin right on any database can do it by loading the WDB module into ...
      (Bugtraq)
    • RE: Linux hacked
      ... I would also suggest using a simple script in the future that alerts ... Subject: Linux hacked ... To get back into your account you want to use, at the boot manager ... boot normally and you should be able to login as root with your new ...
      (Security-Basics)
    • Re: BSDstats v3.0 - The Security Rewrite
      ... The bsdstats script could easily pick up that entry and set ... a management machine, and that management machine only has ... Email is sent to root containing IDTOKEN= as generated by host, root forwards that to rpt@xxxxxxxxxxxx, rpt@xxxxxxxxxxxx sends back KEY= value ... second time, submits report values to root, root forwards that to rpt@xxxxxxxxxxxx ... ...
      (freebsd-questions)
    • Re: Great SWT Program
      ... from a terminal emulator and log in as root there. ... terminal-emulator windows open, ... The script, suid-root utility, or whatever would ... the command interpreter with root privileges ...
      (comp.lang.java.programmer)
    • Re: Rexx problem? - advice sought, Please
      ... Examples (Start with Drive S: current is root): ... In REXX function Directory() gets the same result as CD. ... There have been several public betas of this application using the install script. ...
      (comp.os.os2.programmer.misc)