This discussion is archived
5 Replies Latest reply: Apr 17, 2013 12:20 PM by Dude! RSS

How to conceal user login information under the batch or exe file

user-Keen Explorer
Currently Being Moderated
Dear,

We have created batch file utility to get or put file on linux server but therein no security of password and any body can open this file and misuse that password.

Could you pls share any idea to hide that or any other simple way to do this.

batch code
 @ftp -i -s:"%~f0"&GOTO:EOF
open hrsystem.erp.com
apps_user
erpsystem
!:--- FTP commands below here ---
lcd d:\test
cd  /apps/erp/
binary
mget "*.txt"
disconnect
bye

 
thanks.
  • 1. Re: How to conceal user login information under the batch or exe file
    Dude! Guru
    Currently Being Moderated
    I'm afraid the best answer is not use ftp and instead use password less SSH, which includes SFTP and SCP when using DSA keys.
  • 3. Re: How to conceal user login information under the batch or exe file
    Nik Expert
    Currently Being Moderated
    Hi.
    Dude - say correct solution - use sftp ( scp ) with key-authorisation.
    It's not requre input password.

    FTP - is not secure. Any network sniffer show password for ftp sessions.

    You can put this batch file to special dir and set attributes to file and directory not permitted read this file.

    Regards.
  • 4. Re: How to conceal user login information under the batch or exe file
    user-Keen Explorer
    Currently Being Moderated
    Thanks for you support.

    --Our requirement     
    Actually the scenario is that we have to create utility that get all files under the desire directory from the server and place it on client pc where the utility were run.

    --Your Solutions
    Dude - say correct solution - use sftp ( scp ) with key-authorisation.

    --Reservation
    1. Its mean we have to install ftp/sftp at every client pc, that’s very lengthy exercise and not accordingly a company policy.
    2. When every password changes, concern person will go every pc and update new password.


    Other Solution, which can be handle through batch/exe or any any thing else, in case any update occur we can send file through mail and user place it accordingly.

    Thanks.
  • 5. Re: How to conceal user login information under the batch or exe file
    Dude! Guru
    Currently Being Moderated
    You have not given any information about your Linux server or PC clients and networking environment. As such it is not really possible to give you any recommendation.

    Windows provides it's own methods for single-sign on solutions, which only applies to systems that join your AD domain and use domain user accounts. A solution may exist for you purpose by having your Linux system join your AD domain, and then perhaps using Kerberos based authentication with apache http or samba. It's a complex subject and you need to be more specific.

    If your corporate policies are build around MS Windows and only support MS Windows standards, then your environment is not multi-platform friendly and you cannot rely on standard Linux or Unix solutions.

    Btw, you probably don't want to do a binary transfer of txt files, since Unix and Windows use different line endings.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points