As the recent dev prevents drush being run as root, I am trying to su to user o1, and forgive me if this is a stupid question.... where can I get the or set the user password for the o1 user?

Is it ok if I set the password like passwrd o1 xxxxxxx and just set a new password for user o1 which is what the username is for octopus or will this cause problems later on down the road?

Thanks and sorry for asking.

I have tried to create a non-root user but permission is denied when trying to run drush commands.

Comments

omega8cc’s picture

Project: Barracuda » Octopus
Issue summary: View changes
Status: Active » Closed (works as designed)

The Aegir backend user, by default o1 doesn't have password access enabled, and normally shouldn't have, for security reasons.

You should use the limited shell user for drush, by default o1.ftp

But if for some reason you want to use o1 user, simply switch to it from root with:

su -s /bin/bash - o1

AntiNSA’s picture

The problem is, when I try to do things like drush pml --no-core --type=module --status=enabled --pipe > modules.txt I get permission denied errors. I tried your advice above, but it seems that drush is too cripled to use when not root.

even when doing su -s /bin/bash - o1 and su -s /bin/bash - o1.ftp I get permission denied when trying to disable, upgrade or write modules to a txt file before disabling them..

omega8cc’s picture

This is expected. You should use a target location where your lshell user has write access, for example:

drush pml --no-core --type=module --status=enabled --pipe > ~/static/modules.txt

AntiNSA’s picture

ok, I assume the security measures are for hosting environments with multiple accounts. As I am a singe user, I am not able to run commands like this:

xargs -a modules.txt drush -y dis

I need to use drush to disable different modules in bulk for debugging.

I cant do it from root anynmore, and I cant do it from o1.ftp user account. Can you tell me how I can get permission to safetly do this like in the previous boa releases without jeapordizing my server security?

Thanks for any help...

AntiNSA’s picture

Title: question about o1 user password running drush » How to grant Higher level privileges like using xarg in commands to drush user?

Editing the title because I am finding drush a little to limited for me now and need to be able to run the xarg command but now it is prohibited from both root and o1.ftp user.

AntiNSA’s picture

Priority: Normal » Major

Everything is forbidden.

o1.ftp:~$ xargs -a ~/static/frsh.txt drush -y dis
*** forbidden command -> "xargs"
*** You have 2 warning(s) left, before getting logged out.
This incident has been reported.
o1.ftp:~$ for module in `cat ~/statis/fresh.txt`; do drush -y dis $module; done *** forbidden syntax -> "for module in `cat ~/statis/fresh.txt`; do drush -y dis $module; done"
*** You have 1 warning(s) left, before getting logged out.
This incident has been reported.
o1.ftp:~$

AntiNSA’s picture

Status: Closed (works as designed) » Needs work

sorry to open this, I changed the topoic heading as it is growing into a serious challenge... I am finding out I can almost do nothing with drush wha tI need to do right now and am having big problems....

I have always used the techniques found in this support thread to quickly enable and disable modules with drush "How to use Drush to quickly disable & re-enable all non-core modules" https://drupal.org/node/593406

But now I am unable to do anything listed in that support section...

I have read your BOA 2.2.0 and it says

If you have any reason to use Drush on command line as an Aegir backend/system
user, for example to escape limited shell restrictions, we recommend to
install vanilla Drush 6, for example in /opt/tools/drush/vanilla/drush/ and
then symlink it into /usr/local/bin/ with custom name, so it will be available
automatically in your backend o1 user's PATH.

Does this mean now to get the drush commands we had in all the previous versions, we must manually install drush and set it up ?

can you leave a little bit more details on a detailed walkthrough on how to do that without making problems with boa and octopus? I am afraid to mess anything up in boa. The most I have ever installed on my linode was additional drupal modules ... I always thought that boa was an all i in -one solution.

Is there an easier way to enable or disable modulesas listed in the drush support link above than by installingdrush again as listed in teh boa 2.2.0 read me?

omega8cc’s picture

Priority: Major » Normal
Status: Needs work » Closed (works as designed)

It is not possible. Limited shell user is limited by definition.

Please follow this how-to if you need unrestricted Drush for Aegir system user:

https://drupal.org/comment/8620107#comment-8620107