Menu

Secure copying files to the WANem host

Help
2013-07-01
2013-07-02
  • Ben Klaasen

    Ben Klaasen - 2013-07-01

    Hi -

    I've started sshd on my WANem instance and created a new user account:

    # useradd -c "Me" -m -s /bin/bash me
    

    ...but this user also inherits /etc/profile, which invokes /root/wanem_init.sh on the last line. This means when logging in to the new account I'm in the WANem shell.

    This wouldn't matter, but when I scp files to the WANem host, the copy fails because wanem_init.sh is being invoked by scp too:

    $ scp myImportant.file root@WANem:/var/www/stuff
    root@WANem's password: 
    +------+-----------------+
    

    See the first lines of the table listing each of the IPs of the network interfaces? :-(

    Even if I make the new user account specifying a different skeleton directory, containing a .profile file with the invocation of wanem_init.sh removed, the default /etc/profile is still read first.

    Any suggestions on how to get around this, so I can scp files to an account on the WANem host?

    regards
    Ben

     
  • Ben Klaasen

    Ben Klaasen - 2013-07-02

    OK, I just commented out the two last lines in /root/wanem_init.sh:

    # /root/displayIP.sh
    # /root/wanem.sh
    

    (The file /root/wanem_init.sh is invoked from /etc/profile, which is read by bash at login.) After this change, no user gets either the list of configured IP addresses on login, or the WWANem shell. They're dropped straight into a bash shell. Which, I've discovered, is what I want, nine times out of ten.

    regards
    Ben

     

Log in to post a comment.