Post by Adrian PenisoaraHi,
Din cate tin minte, implementarea jail in FBSD 8 s-a modificat
destul de consistent fata de 7.x si anterior.
Poti incerca un truss pe PID-ul SSHD-ului la care te conectezi ?
Verifica daca ai toate device-urile pe care incearca sa faca open() si
ca sunt accesibile.
PS: /dev in interiorul jail-ului e tot un devfs ?
Regards,
Adrian.
Salutare,
Folosesc de multa vreme sshd in jail. Instaland o masina noua cu
8.0-CURRENT am constatat ca nu ma mai pot loga.
error: openpty: No such file or directory
error: session_pty_req: session 0 alloc failed
In client dupa autentificare imi da "Server refused to allocate
pty "si ramane blocat(nu deconecteaza).
La trecerea de la freebsd 7 la 8 cred ca s-a renuntat la
device-urile pty in favoarea pts/. Posibil ca rezolvarea sa fie
compilarea openssh cu --with-pty=pts, insa
cum buildworld nu e in stare sa compileze corect sshd si sshd nu
apare ca port, fiind integrat in sistemul de baza, nu stiu cum sa
repar problema asta.
Ciudat este ca sshd-ul merge fara probleme in sistemul mare.
Doar in jail pare sa aiba aceasta problema.
________________________________________________________
Din ce spune in log-uri nu poate aloca device-ul:
error: openpty: No such file or directory
error: session_pty_req: session 0 alloc failed
In consola login-ul arata cam asa:
login as: dagos
Authenticating with public key "rsa-key-20090701"
Passphrase for key "rsa-key-20090701":
Server refused to allocate pty
In Jail, /dev/ nici cu intregul /dev/ al sistemului montat nu merge
(devfs -m /usr/local/JAIL/SSHd/dev/ rule apply unhide)
Sistemul contine strictul necesar si folosesc genul asta de ssh in jail
de multa vreme si pe multe masini. Jailul contine strictul necesar sshd,
ssh, telnet si bash.
Este ciudat deoarece dev/pts/ exista in jail.
truss output:
read(6,"\0\0\0\n",4) = 4 (0x4)
read(6,"\^F\0\0\0\^Edagos",10) = 10 (0xa)
stat("/etc/nsswitch.conf",0xbfbfdc88) ERR#2 'No such file or
directory'
geteuid(0x0,0x0,0x0,0x0,0x0,0x0) = 0 (0x0)
open("/etc/spwd.db",O_RDONLY,00) = 4 (0x4)
fcntl(4,F_SETFD,FD_CLOEXEC) = 0 (0x0)
fstat(4,{ mode=-rw------- ,inode=612762,size=40960,blksize=4096 }) = 0 (0x0)
read(4,"\0\^F\^Ua\0\0\0\^B\0\0\^D\M-R\0"...,260) = 260 (0x104)
pread(0x4,0x2862f000,0x1000,0x6000,0x0,0x283d79c0) = 4096 (0x1000)
pread(0x4,0x28630000,0x1000,0x4000,0x0,0x283d79c0) = 4096 (0x1000)
pread(0x4,0x28631000,0x1000,0x5000,0x0,0x283d79c0) = 4096 (0x1000)
close(4) = 0 (0x0)
stat("/bin/bash",{ mode=-rwxr-xr-x
,inode=16844826,size=619952,blksize=4096 }) = 0 (0x0)
lstat("/etc/login.conf",{ mode=-rw-r--r--
,inode=612760,size=6802,blksize=4096 }) = 0 (0x0)
open("/etc/login.conf.db",O_RDONLY,00) ERR#2 'No such file or
directory'
open("/etc/login.conf",O_RDONLY,00) = 4 (0x4)
read(4,"# login.conf - login class capab"...,1024) = 1024 (0x400)
read(4,"\n\t:path=/sbin /bin /usr/sbin /"...,1024) = 1024 (0x400)
close(4) = 0 (0x0)
getpid(0x2864c806,0x7fa,0x80799d9,0xbfbfddf4,0x6,0x2861b42a) = 1806 (0x70e)
__sysctl(0xbfbfddc0,0x4,0x0,0x0,0x2864c800,0x13) = 0 (0x0)
write(6,"\0\0)\M^H\a",5) = 5 (0x5)
write(6,"\^A\0\0\0,\M^H\^P`(\^Dqb(\M-t\^A"...,10631) = 10631 (0x2987)
read(6,"\0\0\0\^A",4) = 4 (0x4)
read(6,"-",1) = 1 (0x1)
open("/etc/pam.d/sshd",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.d/sshd",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/etc/pam.d/other",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.d/other",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/etc/pam.d/other",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.d/other",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/etc/pam.d/other",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.d/other",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/etc/pam.d/other",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.d/other",O_RDONLY,0666) ERR#2 'No such file or
directory'
open("/usr/local/etc/pam.conf",O_RDONLY,0666) ERR#2 'No such file or
directory'
read(6,"\0\0\0\^W",4) = 4 (0x4)
read(6,"\^C\0\0\0\^Nssh-connection\0\0\0"...,23) = 23 (0x17)
read(6,"\0\0\0\M-&",4) = 4 (0x4)
read(6,"\^T\0\0\0\^B\0\0\0\0\0\0\0\0\0\0"...,166) = 166 (0xa6)
geteuid(0x818,0x2860b160,0x2860b130,0x280d86aa,0x2860b160,0xbfbfde2c) =
0 (0x0)
getgroups(0x0,0x0,0x2860b130,0x280d86aa,0x2860b160,0xbfbfde2c) = 1 (0x1)
getgroups(0x1,0x286030a0,0x4,0x280d86aa,0x2860b160,0xbfbfde2c) = 1 (0x1)
stat("/etc/nsswitch.conf",0xbfbfbbd8) ERR#2 'No such file or
directory'
stat("/etc/nsswitch.conf",0xbfbfba48) ERR#2 'No such file or
directory'
stat("/etc/nsswitch.conf",0xbfbfb908) ERR#2 'No such file or
directory'
stat("/etc/nsswitch.conf",0xbfbfba48) ERR#2 'No such file or
directory'
open("/etc/group",O_RDONLY,0666) = 4 (0x4)
lseek(4,0x0,SEEK_CUR) = 0 (0x0)
fstat(4,{ mode=-rw-r--r-- ,inode=612752,size=119,blksize=4096 }) = 0 (0x0)
read(4,"# $FreeBSD: src/etc/group,v 1.31"...,4096) = 119 (0x77)
stat("/etc/nsswitch.conf",0xbfbfba48) ERR#2 'No such file or
directory'
lseek(4,0x0,SEEK_CUR) = 119 (0x77)
stat("/etc/nsswitch.conf",0xbfbfba48) ERR#2 'No such file or
directory'
stat("/etc/nsswitch.conf",0xbfbfba48) ERR#2 'No such file or
directory'
stat("/etc/nsswitch.conf",0xbfbfba48) ERR#2 'No such file or
directory'
read(4,0x2862f000,4096) = 0 (0x0)
stat("/etc/nsswitch.conf",0xbfbfba48) ERR#2 'No such file or
directory'
close(4) = 0 (0x0)
stat("/etc/nsswitch.conf",0xbfbfb908) ERR#2 'No such file or
directory'
Cu respect,
Dragos
________________________________________________________
To unsubscribe send a mail to rofug+unsubscribe-gQFem4m/***@public.gmane.org