.. _credentials-username-password: ====================================================== Managing credentials: username/password authentication ====================================================== For username/password authentication, **a password file** must be configured for mdtmFTP server. On the server side ================== On each host that runs mdtmFTP server, create a password file by using ``globus-gridftp-password``: .. code-block:: console $ /opt/mdtmftp/sbin/globus-gridftp-password > /etc/mdtm/password Password: Enter a password at the prompt. It will ask for a password for the currently logged-in user. Assuming that the currently logged-in user is ``mdtmftp``, it will create a line like below in ``/etc/mdtm/password``: .. code-block:: console mdtmftp:c1CvYmpprfOpc:1014:1015::/home/mdtmftp:/bin/bash You can also set up passwords for other users. First, ask them to run the command: .. code-block:: console $ /opt/mdtmftp/sbin/globus-gridftp-password > ~/mdtm-password They will need to enter a password at the prompt, and send the resulting file ``~/mdtm-password`` to you. Afterward, you need append their username/password line to ``/etc/mdtm/password``. Note: ``root`` is not allowed as username. Once the necessary configuration files are in place, test the mdtmFTP server: .. code-block:: console $ /opt/mdtmftp/sbin/mdtm-ftp-server \ -p 5001 \ -password-file /etc/mdtm/password \ -c /etc/mdtm/server.conf \ -log-level all On the client side ================== Assume that a user ``mdtmftp`` with password ``123456`` has been configured on the server side. To submit a data transfer job using this username and password, run mdtmFTP client like: .. code-block:: console $ /opt/mdtm/bin/mdtm-ftp-client -p 8 \ ftp://mdtmftp:123456@dtn-a.example.net:5001/data1/100G/file1 \ file:///storage/data1/tmp/ More example are in :ref:`examples-username-password`.