Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminfo doesn't exist , almalinux 8 #22

Open
egphp opened this issue Sep 2, 2023 · 8 comments
Open

terminfo doesn't exist , almalinux 8 #22

egphp opened this issue Sep 2, 2023 · 8 comments

Comments

@egphp
Copy link

egphp commented Sep 2, 2023

[root@s home]# su sen
directory /usr/lib/terminfo or /var/local/jail-shell/jails/sen-jail//usr/lib/terminfo doesn't exist
command failed at line 133: bind /usr/lib/terminfo /usr/lib/terminfo ro,nodev,nosuid

su: cannot open session: User not known to the underlying authentication module

@pymumu
Copy link
Owner

pymumu commented Sep 4, 2023

Add the following line.

dir /usr/lib/terminfo

@egphp
Copy link
Author

egphp commented Sep 4, 2023

thanks , but user still can see what out his folder

i need to prevent user to see any thing out of this folder

[sen@s ~]$ ls -l /
total 80
lrwxrwxrwx.   1 root root     7 Oct  9  2021 bin -> usr/bin
dr-xr-xr-x.   6 root root  4096 Sep  4 03:59 boot
drwxr-xr-x.  18 root root  3500 Sep  4 04:02 dev
drwxr-xr-x.  98 root root  4096 Sep  4 04:09 etc
drwxr-xr-x.   3 root root  4096 Sep  4 04:05 home
-rw-r-----.   1 root root   635 Sep  4 03:59 installimage.conf
-rw-r-----.   1 root root 13953 Sep  4 03:59 installimage.debug
lrwxrwxrwx.   1 root root     7 Oct  9  2021 lib -> usr/lib
lrwxrwxrwx.   1 root root     9 Oct  9  2021 lib64 -> usr/lib64
drwx------.   2 root root 16384 May 16 12:52 lost+found
drwxr-xr-x.   2 root root  4096 Oct  9  2021 media
drwxr-xr-x.   2 root root  4096 Oct  9  2021 mnt
drwxr-xr-x.   3 root root  4096 Sep  4 04:04 opt
dr-xr-xr-x. 379 root root     0 Sep  4 04:02 proc
dr-xr-x---.   4 root root  4096 Sep  4 04:04 root
drwxr-xr-x.  30 root root   860 Sep  4 04:13 run
lrwxrwxrwx.   1 root root     8 Oct  9  2021 sbin -> usr/sbin
drwxr-xr-x.   2 root root  4096 Oct  9  2021 srv
dr-xr-xr-x.  13 root root     0 Sep  4 04:02 sys
drwxrwxrwt.  10 root root  4096 Sep  4 04:09 tmp
drwxr-xr-x.  12 root root  4096 May 16 12:53 usr
drwxr-xr-x.  20 root root  4096 May 16 12:57 var
[sen@s ~]$ 

@pymumu
Copy link
Owner

pymumu commented Sep 4, 2023

Add user to jail-shell.

sudo jail-shell user -a test -j test-jail

@egphp
Copy link
Author

egphp commented Sep 4, 2023

after that command ,
not login ssh
client_loop: send disconnect: Broken pipe

@egphp
Copy link
Author

egphp commented Sep 4, 2023

[root@s jail-config]# ssh sen@127.0.0.1
sen@127.0.0.1's password:
client_loop: send disconnect: Broken pipe
[root@s jail-config]#

@john-f-chamberlain
Copy link

john-f-chamberlain commented Sep 6, 2023

I was also having this issue on Oracle Linux 8.
It turns out the folder "/usr/lib/terminfo" does not exist on OL8. So removing the following lines from the jail config solved the issue:

(line 65)

dir /usr/lib/terminfo 0755 root:root

(line 133)

bind /usr/lib/terminfo /usr/lib/terminfo ro,nodev,nosuid

@john-f-chamberlain
Copy link

If you delete the lines certain functions (like backspace) will no longer work properly. Instead of deleting the lines, change /usr/lib/terminfo to /usr/share/terminfo

@Venurs
Copy link

Venurs commented Dec 13, 2023

after that command , not login ssh client_loop: send disconnect: Broken pipe
I have the same problem. how can I solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants