Support Questions

Find answers, ask questions, and share your expertise

recover username and password from services installed

New Contributor


I am using hadoop hortonworks hdp and I have installed services such as hdfs, yarn, mapreduce2, tez, spark2, hive, hbase, sqoop, zookeeper, kafka, etc.


The problem i face now is for all this services that has been installed, I've actually forgotten the username and password for each of this service and the reason being I post this question is because I need to update a listing and keep in a secure manner to allow for future reference.


Is there a way to check how can this username and password be located in the server?





@Mighty Mike

Normally you don't need to remember the passwords for these service users if you have root access or you are included in the sudoers files then you can switch to a user (su) using the below methods

su - {username} sets up the shell environment as if it were a clean login as the specified user, it accesses and uses specified users environment variables,

su {username} just starts a shell with current environment settings for the specified user.

If the username is not specified with su and su -, the root account is implied as default.

To check the usernames you run

cat /etc/passwd

Sample output


The encrypted passwords and other information such as password expiry information (the password aging information) are stored in /etc/shadow file. All fields are separated by a colon (:) symbol. It contains one entry per line for each user listed in /etc/passwd

Sample output


Hope that helps

New Contributor

I forgot my sqoop username. I am unable to use sqoop import or export because of this. How can we retrieve the username or reset the username. Appreciate your help.

New Contributor

anyways i solved the issue by setting up a new user id and password to access mysql from sqoop using the following command.


(1.) Log into MySQL as root 

mysql -u root -p



mysql> grant all privileges on *.* to 'testuser'@'%' identified by 'testpassword'


and it all worked fine. Thank you



If you have the root access just  switch to user sqoop as root user

# su - sqoop
$ id
uid=1020(sqoop) gid=1007(hadoop) groups=1007(hadoop)


Now you should be able to execute all sqoop commands with no need for a password



New Contributor

HI Shelton,


Is it possible to  reset passwords for all Hadoop accounts(hdfs, oozie etc). 

Expert Contributor

hdfs,yarn,hive etc are system users, they will not have any passwords by default, however you can su from root. If you really want set passwords anyway then $ passwd hdfs command will prompt you to set a new password but i don't see a reason why anyone want to do that for system users. 

Em Jay
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.