PING - Unknown host 127.0.0.1, Unknown host localhost - Solaris 10

Hello,

I have a problem - I created a chrooted jail for one user. When I'm logged in as root, everything work fine, but when I'm logged in as a chrooted user - I have many problems:

  1. When I execute the command ping, I get weird results:
bash-3.00$ usr/sbin/ping localhost 
usr/sbin/ping: unknown host localhost

bash-3.00$ usr/sbin/ping 127.0.0.1
usr/sbin/ping: unknown host 127.0.0.1

bash-3.00$ usr/sbin/ping ip_address1
usr/sbin/ping: unknown host ip_address1
  1. When I execute
bash-3.00$ svcs -x

I get:

svcs: Could not bind to repository server: repository server unavailable. Exiting.
  1. When I try to sftp or ssh another machine
bash-3.00$ sftp ip_address1

bash-3.00$ ssh ip_address1

I receive the message:

Host key verification failed.

although I am able to ssh/sftp the machine as root

  1. When I ftp another machine
bash-3.00$ ftp ip_address1

I get

unknown host or invalid literal address
  1. If I telnet another machine:
bash-3.00$ telnet ip_address1

I receive

ip_address1: service name not available for the specified socket type

I need to add that all these commands work perfectly for root. I probably didn't copy some of the necessary configuration files/programs to the chrooted directory. But which ones?

Regards,
Przemek

Helo.
Points 1, 4 and 5, copy system's /etc/hosts into the jail's etc/
Point 2, no idea :slight_smile:
Point 3, check perms for the users' home inside the jail, specially $HOME/.ssh/known_hosts
Regards.

Pls restart all services. Best is to perform a cold boot of your system first.

Check contents and permissions of /etc/inet/hosts, /etc/inet/ipnodes and /etc/nsswitch.conf

1st thing is, u have to give client ip address and client name in /etc/hosts file.
restart the all services.