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