host and jails csh login with "The terminal database could not be opened"

bal0an

Explorer
Joined
Mar 2, 2012
Messages
72
I have made two changes to my TrueNAS instance:
1. upgrade NAS to 12.0-U4.1, and
2. upgrade some jails to 12.2-RELEASE-p6.
So when I login to my host with putty I now get below.
What is the correct way to fix the terminal?
Code:
Last login: Sat Jul 24 16:28:42 2021 from 192.168.178.67
FreeBSD 12.2-RELEASE-p6 df578562304(HEAD) TRUENAS

        TrueNAS (c) 2009-2021, iXsystems, Inc.
        All rights reserved.
        TrueNAS code is released under the modified BSD license with some
        files copyrighted by (c) iXsystems, Inc.

        For more information, documentation, help or support, go here:
        http://truenas.com
This is the PRIMARY NAS.

Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.

csh: The terminal database could not be opened.
csh: using dumb terminal settings.
root@nas1:~ # env
USER=root
LOGNAME=root
HOME=/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
MAIL=/var/mail/root
SHELL=/bin/csh
BLOCKSIZE=K
MM_CHARSET=UTF-8
LANG=en_US.UTF-8
TERM=putty-256color
SSH_CLIENT=192.168.178.35 51229 22
SSH_CONNECTION=192.168.178.35 51229 192.168.178.5 22
SSH_TTY=/dev/pts/1
HOSTTYPE=FreeBSD
VENDOR=amd
OSTYPE=FreeBSD
MACHTYPE=x86_64
SHLVL=1
PWD=/root
GROUP=wheel
HOST=nas1.fritz.box
REMOTEHOST=192.168.178.35
EDITOR=vi
PAGER=less
 

Sean Hafeez

Dabbler
Joined
Jun 23, 2014
Messages
31
So funny enough after my upgrade to TrueNAS-12.0-U6 I see the same issue when I ssh to the box. set term=xterm-256color fixes it for the session, but I have not tracked down why it started happening.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
In PuTTY, try setting the terminal type under Connection->Data to just xterm, which is the default. Your server is just complaining it doesn't know what terminal type to use for putty-256color.

For all the supported terminal types, look in /usr/share/misc/termcap. There's an entry for putty as a clone of vt220-color.
 
Last edited:

Sean Hafeez

Dabbler
Joined
Jun 23, 2014
Messages
31
In my case the terminal I am connecting from is tmux-256-color. It is just strange as my git history shows me making that change a long time ago and this is the first time I have seen this when I connect.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Top