HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Change jailed user login shell (http://www.howtoforge.com/forums/showthread.php?t=15900)

dsadm 1st October 2007 23:10

Change jailed user login shell
 
I would love to change the login shell on the host (unchrooted) from /bin/bash to something else before the user is jailed into their own directory. (/etc/passwd) I would also love to change the chrooted user's default shell to something else. (/var/www/[domain]/etc/passwd)

I can do both of these things manually but I find out when I do, ispconfig reverts back to its defaults thus leaving any user with the special chrooted system inoperable. Is there a way to change the default settings in the first place in the config files? I am very perplexed after many days of trying this on my own. Thanks for any help.

-Adam

till 1st October 2007 23:44

Have a look at the file /root/ispconfig/scripts/lib/config.lib.php around line 601 (user_insert function) and line 794 (user_update function).

You might also have to modify the script /root/ispconfig/scripts/shell/create_chroot_env.sh

dsadm 2nd October 2007 04:45

Ummmm...

After looking at the files esp: /root/ispconfig/scripts/shell/create_chroot_env.sh I noticed my changes I made to the file have been overwritten when I made an upgraded to the latest version. Will upgrades always overwrite scripts and changes I have made? I am not happy for I added applications to the 'APPS' arg. Will these changes I make again be lost in the next upgrade?

-Adam

sjau 2nd October 2007 08:03

maybe this howto helps:

http://www.howtoforge.com/mysecuresh...tp_debian_etch

till 2nd October 2007 09:35

Quote:

Originally Posted by dsadm
Ummmm...

After looking at the files esp: /root/ispconfig/scripts/shell/create_chroot_env.sh I noticed my changes I made to the file have been overwritten when I made an upgraded to the latest version. Will upgrades always overwrite scripts and changes I have made? I am not happy for I added applications to the 'APPS' arg. Will these changes I make again be lost in the next upgrade?

Yes, a update of ISPConfig changes the ISPConfig script files.

dsadm 2nd October 2007 19:41

Quote:

Originally Posted by sjau

Thank you for the link. I am using something close to that called jail kit which works pretty much on the same idea but I am glad there are others like jail kit instead of altering ssh code. (http://olivier.sessink.nl/jailkit/howtos_ssh_only.html) I wonder though if speed and security are the same with mysecureshell and jail kit as to ssh.

-Adam

dsadm 2nd October 2007 19:44

Quote:

Originally Posted by till
Yes, a update of ISPConfig changes the ISPConfig script files.


That is a shame. Makes more work for someone in the end. At lease one can make a list of the changes and write a script to change them after an upgrade.

-Adam

till 3rd October 2007 13:58

Can you tell me how a software shall update itself when no file can be changed? Thats is just impossible.


All times are GMT +2. The time now is 05:09.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.