views:

30

answers:

1

Hi

We build software running on Linux servers (Centos)

We don't want the customer to have access to the Linux server, but the customer sometimes need to know the ipaddress of the server.

So my question is: Is it possible to display the ipaddress at the loginscreen (no graphical interface), that means, before the user has logged in?

Michael

+3  A: 

Yes, it is possible. If you're talking about a text console, then you just need to create a shell script that executes this command:

/usr/bin/watch -n 60 /sbin/ifconfig > /dev/tty2

Then change /etc/inittab so that it runs that shell script on tty2 instead of getty. The user then just has to switch to tty2 with ALT+2 to see the network settings, including IP address.

You can also do it if you have a graphical X login, but it's a little more work.

caf
Fantastic, just what we needed :-)
Reiler