[ https://issues.apache.org/jira/browse/HIVE-13589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434159#comment-15434159 ]
Vihang Karajgaonkar commented on HIVE-13589: -------------------------------------------- I think we should not put a limitation that -p should be the last argument. This would be a bad user-experience. If the main reason for this issue is to avoid showing the password in the command history, the ideal behavior should be that user does not provide a password while connecting and beeline should prompt for one when it finds that there is no password provided. The issue is due to the code block below. When the password is null, it sets it to empty string due to which beeline does not prompt for the password when it is not provided. I think we should fix this behavior which would provide a way for the user to achieve the same without limiting the usability of the -p argument. {noformat} private String constructCmd(String url, String user, String pass, String driver, boolean stripPasswd) { String com = "!connect " + url + " " + (user == null || user.length() == 0 ? "''" : user) + " "; if (stripPasswd) { com += PASSWD_MASK + " "; } else { com += (pass == null || pass.length() == 0 ? "''" : pass) + " "; } com += (driver == null ? "" : driver); return com; } {noformat} > beeline - support prompt for password with '-u' option > ------------------------------------------------------ > > Key: HIVE-13589 > URL: https://issues.apache.org/jira/browse/HIVE-13589 > Project: Hive > Issue Type: Bug > Components: Beeline > Reporter: Thejas M Nair > Assignee: Ke Jia > Attachments: HIVE-13589.1.patch, HIVE-13589.2.patch, > HIVE-13589.3.patch > > > Specifying connection string using commandline options in beeline is > convenient, as it gets saved in shell command history, and it is easy to > retrieve it from there. > However, specifying the password in command prompt is not secure as it gets > displayed on screen and saved in the history. > It should be possible to specify '-p' without an argument to make beeline > prompt for password. -- This message was sent by Atlassian JIRA (v6.3.4#6332)