jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Jailkit-users] jk_lsh[7742]: cannot find user info for USER guest:


From: Olivier Sessink
Subject: Re: [Jailkit-users] jk_lsh[7742]: cannot find user info for USER guest: Success (2)
Date: Fri, 14 Dec 2018 14:03:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 14-12-18 13:10, John Pilkington wrote:
My apologies: having sent the first version of this request I realise it will be much easier for people to help me if I include the file contents that I refer to in-line:

I have set up an sftp/scp only shell for a jailed user (guest, pwd guest) under Raspbian Stretch and following very precisely the steps in the jailkit howto instructions for that scenario, except for the change in user name.

On sftp address@hidden the connection closes immediately after entering the password. Here are  the relevant lines in auth.log. 

Dec 14 09:47:29 raspberrypi sshd[7725]: Accepted password for guest from ::1 port 44498 ssh2
Dec 14 09:47:29 raspberrypi sshd[7725]: pam_unix(sshd:session): session opened for user guest by (uid=0)
Dec 14 09:47:29 raspberrypi systemd-logind[294]: New session c119 of user guest.
Dec 14 09:47:29 raspberrypi systemd: pam_unix(systemd-user:session): session opened for user guest by (uid=0)
Dec 14 09:47:29 raspberrypi jk_chrootsh[7742]: now entering jail /srv/sftpjail for user guest (1002) with arguments -c /usr/lib/openssh/sftp-server
Dec 14 09:47:29 raspberrypi jk_lsh[7742]: jk_lsh version 2.20, started
Dec 14 09:47:29 raspberrypi jk_lsh[7742]: cannot find user info for USER guest: Success

I just looked at the code, this means that the call to the system function getpwnam() was succesfull, but the system did not find user "guest" in the password file.. Which is weird because the passwd files look identical and correct.

is the line

guest:x:1002:1002:,,,:/home/guest:/usr/sbin/jk_lsh

in /srv/sftpjail/etc/passwd followed by a newline character? Possibly this could cause an issue?

Olivier

-- 
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]