Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th March 2013, 11:03
wwweiss wwweiss is offline
Junior Member
 
Join Date: Jan 2013
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default SSH User with Jailkit: wrong entry in passwd

Hi,

my System is Ubuntu 12.04.2 LTS with ISPConfig 3.0.5.1

When adding shell users with jailkit the passwd file has a wrong entry. It Looks like this:

tester_s1:x:5005:5006:::/bin/bash

If I Change this manually to

tester_s1:x:5005:5006::/home/tester_s1:/bin/bash

everything works without any problems.
Is this a bug or do I have any missconfiguration? If so, how can I change it?
Reply With Quote
Sponsored Links
  #2  
Old 6th March 2013, 12:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

http://www.howtoforge.com/forums/showthread.php?t=58408
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 6th March 2013, 16:27
wwweiss wwweiss is offline
Junior Member
 
Join Date: Jan 2013
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I set the loglevel to debug and added one more SSH-User. This is the what I get in the system log:

2013-03-06 15:06 h1.wwweiss.de Debug Processed datalog_id 100
2013-03-06 15:06 h1.wwweiss.de Debug Jailkit Plugin -> insert username:autobendert1
2013-03-06 15:06 h1.wwweiss.de Debug ssh-rsa key updated in /var/www/clients/client5/web5//home/autobendert1/.ssh/authorized_keys
2013-03-06 15:06 h1.wwweiss.de Debug ssh-rsa authorisation keyfile created in /var/www/clients/client5/web5//home/autobendert1/.ssh/authorized_keys
2013-03-06 15:06 h1.wwweiss.de Debug ssh-rsa setup shelluser_jailkit
2013-03-06 15:06 h1.wwweiss.de Debug Added jailkit parent user home in : /var/www/clients/client5/web5/home/web5
2013-03-06 15:06 h1.wwweiss.de Debug Added created jailkit user home in : /var/www/clients/client5/web5/home/autobendert1
2013-03-06 15:06 h1.wwweiss.de Debug Added jailkit user to chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_user.sh autobendert1 /var/www/clients/client5/web5 /home/autobendert1 /bin/bash web5 /home/web5
2013-03-06 15:06 h1.wwweiss.de Debug Calling function 'insert' from plugin 'shelluser_jailkit_plugin' raised by event 'shell_user_insert'.
2013-03-06 15:06 h1.wwweiss.de Debug Disabling shelluser temporarily: usermod -s /bin/false -L autobendert1 2>/dev/null
2013-03-06 15:06 h1.wwweiss.de Debug ssh-rsa key updated in /var/www/clients/client5/web5/.ssh/authorized_keys
2013-03-06 15:06 h1.wwweiss.de Debug ssh-rsa setup shelluser_base
2013-03-06 15:06 h1.wwweiss.de Debug Added shelluser: autobendert1
2013-03-06 15:06 h1.wwweiss.de Debug Executed command: useradd -d /var/www/clients/client5/web5 -g client5 -o -p $1$mYL4C1uQ$.5GEa4tLEYBf4W/e7UZ/Z/ -s /bin/bash -u 5005 autobendert1
2013-03-06 15:06 h1.wwweiss.de Debug Calling function 'insert' from plugin 'shelluser_base_plugin' raised by event 'shell_user_insert'.
2013-03-06 15:06 h1.wwweiss.de Debug Found 1 changes, starting update process.


I am not sure if this gives the relevant Infos, because I do not get any error, just the wrong entry in passwd.

Can you see what is going wrong?
Reply With Quote
  #4  
Old 6th March 2013, 16:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

The output from system log is just part of the information. Relevant is the output you get on the shell while running the server.sh command as this output contains also error messages from external commands like useradd and usermod.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 7th March 2013, 10:43
wwweiss wwweiss is offline
Junior Member
 
Join Date: Jan 2013
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Running the server.sh from the Shell does not give more information. Here is the Output:

07.03.2013-09:33 - DEBUG - Calling function 'insert' from plugin 'shelluser_base_plugin' raised by event 'shell_user_insert'.
07.03.2013-09:33 - DEBUG - Executed command: useradd -d /var/www/clients/client5/web5 -g client5 -o -p \$1\$2F59+y2X\$F/9t3Oh1SVLGYoFOmSR2R/ -s /bin/bash -u 5005 autobendert2
07.03.2013-09:33 - DEBUG - Added shelluser: autobendert2
07.03.2013-09:33 - DEBUG - ssh-rsa setup shelluser_base
07.03.2013-09:33 - DEBUG - ssh-rsa key updated in /var/www/clients/client5/web5/.ssh/authorized_keys
07.03.2013-09:33 - DEBUG - Disabling shelluser temporarily: usermod -s /bin/false -L autobendert2 2>/dev/null
07.03.2013-09:33 - DEBUG - Calling function 'insert' from plugin 'shelluser_jailkit_plugin' raised by event 'shell_user_insert'.
07.03.2013-09:33 - DEBUG - Added jailkit user to chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_user.sh autobendert2 /var/www/clients/client5/web5 /home/autobendert2 /bin/bash web5 /home/web5
07.03.2013-09:33 - DEBUG - Added created jailkit user home in : /var/www/clients/client5/web5/home/autobendert2
07.03.2013-09:33 - DEBUG - Added jailkit parent user home in : /var/www/clients/client5/web5/home/web5
07.03.2013-09:33 - DEBUG - ssh-rsa setup shelluser_jailkit
07.03.2013-09:33 - DEBUG - ssh-rsa authorisation keyfile created in /var/www/clients/client5/web5//home/autobendert2/.ssh/authorized_keys
07.03.2013-09:33 - DEBUG - ssh-rsa key updated in /var/www/clients/client5/web5//home/autobendert2/.ssh/authorized_keys
07.03.2013-09:33 - DEBUG - Jailkit Plugin -> insert username:autobendert2
07.03.2013-09:33 - DEBUG - Processed datalog_id 102
07.03.2013-09:33 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

I think something is going wrong with my Jailkit installation. Which process is responsible for writing the passwd file? Because I don't get any error Messages I think I made an error somewhere in the configuration. Everything seems to work correctly, just writes the wrong data to passwd.
Reply With Quote
  #6  
Old 7th March 2013, 12:00
wwweiss wwweiss is offline
Junior Member
 
Join Date: Jan 2013
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

I made some more tests and found the following. Looking to the script /usr/local/ispconfig/server/scripts/create_jailkit_user.sh I made the commands listet there directly from the shell, so I did:

useradd -g 5006 -u 5005 -o shtest
jk_jailuser -n -s /bin/bash -j /var/www/clients/client5/web5/ shtest

After these two lines everything is written correctly. Seems that some other commands make the entries in the passwd file wrong afterwards.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My Server Is Sending Spam. How Do I Block This? LordJ Server Operation 1 7th July 2011 19:34
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Hacked server Captain Installation/Configuration 8 23rd December 2010 10:39
Auth.log question spikes Server Operation 0 12th December 2010 21:24
dovecot: lda: Fatal: Unknown user dpicella Installation/Configuration 1 22nd August 2010 02:59


All times are GMT +2. The time now is 17:04.


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