Friday, April 19, 2019

sudo to mongod


service account configuration
------------------------------

Please run the below commands as root user,

# vi /etc/passwd/

only for the mongod user - have to change the home path and /bin/false to /bin/bash

/var/lib/mongo:/bin/false
to
/home/mongod:/bin/bash

# mkdir -p /home/mongod
# cp .bash_profile .bashrc /home/mongod/
# chown -R mongod:mongod /home/mongod/

new commands
-----------------

usermod -d /var/lib/mongo mongod

usermod --shell /bin/bash  mongod 

No comments:

Post a Comment