MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: nmpribeiro 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...)
-
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
-
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
-
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:
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!
-
Thank you mvillanueva!
That's was all I needed to finalize setting up my box.
Regards!