root as user on spazwn of ksh and ftp

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf root as user on spazwn of ksh and ftp

  • Creator
    Topic
  • #53184
    Bob Schmid
    Participant

      1: spawn $env(SHELL)

      dbg1.3> spawn /bin/ksh 1: match_max 100000

      dbg1.4> 1: expect -exact “$ ”

      dbg1.5> $ 1: send — “ftp pcr”

      dbg1.6> 1: expect -re “Name.*pc”

      dbg1.7> ftp pc Connected to xxxxxxx.xxxx.xxxxx-xxxxx.org. 220 m500326 FTP server (Version 4.2 Wed Jun 16 13:12:04 CDT 2010) ready. Name (pc:root): 1: send — “ui05intr”

      why do i get user of “root” when i am logged in as hci?

      when I initiate ftp manually from command promot i get (pc:hci)……

      what can i look at?

      Bob

    Viewing 2 reply threads
    • Author
      Replies
      • #76853
        David Barr
        Participant

          It probably has to do with how you are starting your expect session. Maybe your USER environment variable isn’t set. How are you running expect? Are you launching it from a terminal window? How are you opening your terminal window? If you’re using “xterm”, make sure to pass the “login shell” (-ls) argument when you run it. Other terminals might have a slightly different option. If you are using “su” to get to hci from another user, make sure that you use “su -“.

        • #76854
          David Barr
          Participant

            This might be a ksh problem. You can see this post for more information:

            <a href="http://www.unix.com/aix/107474-ksh-login-shell-bypassing-profile.html&#8221; class=”bbcode_url”>http://www.unix.com/aix/107474-ksh-login-shell-bypassing-profile.html

            If you can use bash, it might work better. Bash has a -login option.

          • #76855
            Bob Schmid
            Participant

              I will check it out!

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.