Login into ezjail-admin host from custom user not root

sysnes

New Member


Messages: 4

#1
Hello there, generally I login to main machine as root, then I access to host with this command:

ezjail-admin console WEBSERVER

But my question is possible to login to main machine as normal user and then access to:

#mynormaluser ezjail-admin console WEBSERVER

When I do that, I get this:

Code:
jexec: jail_attach(3): Operation not permitted
Already I have done:

pw groupmod wheel -m mynormaluser

but not work, is this possible ?
 
Last edited by a moderator:

DiscmanDaemon

Member

Thanks: 16
Messages: 35

#2
The normal user would basically have to be given root permissions for this to work I believe since it would require permissions to all the files created by the root ezjail process that created the jail.

If you look at the permissions of the files in the jail you have created wit ezjail, you will see they are xrw-xr-x and owned by root, meaning your user, although in the wheel group, does not have write permissions for anything inside the jail. You might be able to remedy this by changing the permissions of all the files in the jail (ie recursively on the root directory of the jail), but I have never tried it and it seems like a bad idea to mess with the permissions of the various mount and the like of a jail. Not to mention your giving your normal user enormous privelages by doing this. If you want to try it out, let me know what happens :)
 

asteriskRoss

Well-Known Member

Thanks: 132
Messages: 418

#4
Welcome to the forums, sysnes. Two further alternatives:
  • security/sudo configured to allow your user account to run ezjail-admin with root privileges.
  • (Assuming you connect from a remote machine anyway) Run sshd in the jail and log in directly to it, rather than first via the host.
 
Top