user.d 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Long: user
  2. Short: u
  3. Arg: <user:password>
  4. Help: Server user and password
  5. Category: important auth
  6. Example: -u user:secret $URL
  7. Added: 4.0
  8. See-also: netrc config
  9. ---
  10. Specify the user name and password to use for server authentication. Overrides
  11. --netrc and --netrc-optional.
  12. If you simply specify the user name, curl will prompt for a password.
  13. The user name and passwords are split up on the first colon, which makes it
  14. impossible to use a colon in the user name with this option. The password can,
  15. still.
  16. On systems where it works, curl will hide the given option argument from
  17. process listings. This is not enough to protect credentials from possibly
  18. getting seen by other users on the same system as they will still be visible
  19. for a moment before cleared. Such sensitive data should be retrieved from a
  20. file instead or similar and never used in clear text in a command line.
  21. When using Kerberos V5 with a Windows based server you should include the
  22. Windows domain name in the user name, in order for the server to successfully
  23. obtain a Kerberos Ticket. If you do not, then the initial authentication
  24. handshake may fail.
  25. When using NTLM, the user name can be specified simply as the user name,
  26. without the domain, if there is a single domain and forest in your setup
  27. for example.
  28. To specify the domain name use either Down-Level Logon Name or UPN (User
  29. Principal Name) formats. For example, EXAMPLE\\user and user@example.com
  30. respectively.
  31. If you use a Windows SSPI-enabled curl binary and perform Kerberos V5,
  32. Negotiate, NTLM or Digest authentication then you can tell curl to select
  33. the user name and password from your environment by specifying a single colon
  34. with this option: "-u :".
  35. If this option is used several times, the last one will be used.