Opened 10 years ago

Last modified 10 years ago

#931 new defect

deployment documentation - switch to mediagoblin user with sudo

Reported by: Alberto Owned by:
Priority: minor Milestone:
Component: documentation Keywords:
Cc: Parent Tickets:

Description

Switching to the mediagoblin user with sudo as mentioned in the document: http://mediagoblin.readthedocs.org/en/latest/siteadmin/deploying.html cause problems, at least with ubuntu 14.04:

===================================
No password will be assigned to this account, and you will not be able to log in as this user. To switch to this account, enter either:

sudo -u mediagoblin /bin/bash # (if you have sudo permissions)
or:

su mediagoblin -s /bin/bash # (if you have to use root permissions)
===============================

After using "sudo -u mediagoblin /bin/bash" to switch to the mediagoblin user, and executing ./bin/gmg dbupdate for example, there is an error regarding the path of the directory .python-egg which points to homedir of the user that executed the "sudo -u mediagoblin /bin/bash" command. If you use "sudo su -" first to swicht to root and then enter the second command mentioned in the doc "su mediagoblin -s /bin/bash", it works perfectly. The .python-egg directory used in this case is the one in the mediagoblin user homedir.

In my opinion, this:

===================================
No password will be assigned to this account, and you will not be able to log in as this user. To switch to this account, enter either:

sudo -u mediagoblin /bin/bash # (if you have sudo permissions)
or:

su mediagoblin -s /bin/bash # (if you have to use root permissions)
===============================

should be replaced for something like this:

===================================
No password will be assigned to this account, and you will not be able to log in as this user. To switch to this account, enter the following if you are logged as root:

su mediagoblin -s /bin/bash

In case you are not logged as root, excute first "sudo su -" to switch to the root user and then enter the command mentioned above.
===============================

in the documentation.

Change History (1)

comment:1 by ayleph, 10 years ago

If you use "sudo su -" first to swicht to root and then enter the second command mentioned in the doc "su mediagoblin -s /bin/bash", it works perfectly. The .python-egg directory used in this case is the one in the mediagoblin user homedir.

Did you create a home directory for the mediagoblin user when you created the account?

The way the documentation is written, there is no mediagoblin user homedir. What it looks like your suggestion does is first log in as root and switch to the root user homedir, then log in to the mediagoblin user while remaining in the root user homedir (unless you were to run the command as su - mediagoblin -s /bin/bash, but that would complain if you didn't have a homedir for the mediagoblin user). I don't see how this solves the issue you reported.

Note: See TracTickets for help on using tickets.