Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-25, 07:24:56

Author Topic: Drush in Kloxo-mr  (Read 4217 times)

0 Members and 1 Guest are viewing this topic.

Offline nmpribeiro

  • Valuable Member
  • *
  • Posts: 69
  • Karma: +1/-0
    • View Profile
Drush in Kloxo-mr
« on: 2014-06-16, 11:23:43 »
So...

So far I can only ssh login as root... I've managed to install drush through pecl (see github drush project for install instructions)

But now, if I try to exec drush:

p]# drush help
You are running the provision script as the root user. Exiting                                             [error]

So... i guess I'll really need to figure out a way to switch to another user and trigger this program.
Has anyone been struggling with this?
I'll dig further once I have the time.


(by the way, drush is not only for development...)

Offline mvillanueva

  • Junior Member
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Drush in Kloxo-mr
« Reply #1 on: 2014-06-16, 13:23:56 »
Never used, but if you have to run it as normal user, try to create a test user to do so. Also, you can give SSH access to normal users, and also to admin. Will check this in a while

Offline nmpribeiro

  • Valuable Member
  • *
  • Posts: 69
  • Karma: +1/-0
    • View Profile
Re: Drush in Kloxo-mr
« Reply #2 on: 2014-06-16, 13:48:47 »
Sure, but althou I've tried to change back and forth "ssh access for admin" from bash to disabled to the other one, I had no success.

Since I only wanted to su - admin, I've managed to change the line with the admin user from /etc/passwd and replaced /sbin/nologin to /bin/bash

Still can't ssh login, but good enough that I can switch from root to admin.
Thought it was safer to let admin ssh login instead of root.... this needs a polishing touch

Offline mvillanueva

  • Junior Member
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Drush in Kloxo-mr
« Reply #3 on: 2014-06-16, 23:10:35 »
If you have sudo installed on your box, you can add an user to sudoers and limit the scripts/programs she/he can run.

You can check this reference: http://serverfault.com/questions/36759/editing-sudoers-file-to-restrict-a-users-commands

Specially the part:
Quote

sure, as root call visudo and prevent 'user' from running /sbin/halt:

user ALL=(ALL) NOPASSWD: !/sbin/halt


This restriction has the ability to disable "halt" command to be executed my ALL users.
Refer to man pages of sudo to verify what can and cannot be done by this approach.

Regards!

Offline nmpribeiro

  • Valuable Member
  • *
  • Posts: 69
  • Karma: +1/-0
    • View Profile
Re: Drush in Kloxo-mr
« Reply #4 on: 2014-06-17, 11:17:20 »
Thank you mvillanueva!

That's was all I needed to finalize setting up my box.

Regards!

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.075 seconds with 19 queries.

web stats analysis