Penguin
Note: You are viewing an old revision of this page. View the current version.

If you use IRC/ftp servers then you may find this quick guide handy. First check out this URL to see what ident actually is: http://en.wikipedia.org/wiki/Identd

Most ident servers, will send a response containing the username of the current user, but what if we want to return something different? This is because we dont want hackers to know usernames on our machine or perhaps logging into an FTP server requires you to have a specific ident.

For example an FTP server may be configured to only allow a particular user to login with the specific ident "dog". Well if your username is not "dog" then this could be tricky. Luckily some ident servers allow us to return anything we desire to ident requests.

This tutorial is for an ident server I use called "ident2" and is written for Ubuntu.

First download the package:

  • sudo aptitude install ident2

Good now kill it!

  • sudo killall -HUP ident2

Now we will tell ident2 what we want to return to ident requests.

  • echo ’ident <identreply>’ > ~/.ident

Now lets get it started again. (The -i switch tells to use the user-defined ident reply).

  • sudo ident2 -i

Now we may want to have the ident2 server boot at startup so use nano to create a bash script in /etc/init.d/ (The startup/shutdown scripts all live in directory /etc/init.d)

  • sudo nano /etc/init.d/ident2

Paste this: (Thanks to cmonopoly72 on http://community.smoothwall.org)

#! /bin/sh
#
# ident2   Start/Stop RFC 1413 ident2 server
#
# chkconfig: 345 35 65
# description:   The identd server provides a means to determine the identity
#      of a user of a particular TCP connection.  Given a TCP port
#      number pair, it returns a character string which identifies
#      the owner of that connection on the server's system.
# processname: ident2
# pidfile: /var/run/ident2
# config: /etc/identd.conf

# Source function library.
. /lib/lsb/init-functions

[ -x /usr/local/sbin/ident2 ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
  start)
   log_begin_msg "Starting ident2: "
   /usr/local/sbin/ident2
   RETVAL=$?
   echo
   [ $RETVAL -eq 0 ] && touch /var/run/identd/ident2.pid
   ;;
  stop)
   log_begin_msg "Stopping ident2 services: "
   killproc ident2
   RETVAL=$?
   echo
   [ $RETVAL -eq 0 ] && rm -f /var/run/identd/ident2.pid
   ;;
  status)
   status ident2
   RETVAL=$?
   ;;
  restart|reload)
   $0 stop
   $0 start
   RETVAL=$?
   ;;
  *)
   log_success_msg "Usage: ident2 {start|stop|status|restart|reload}\n"
   exit 1
esac

exit $RETVAL

Save your script then add it using update-rc.d:

  • sudo update-rc.d ident2 defaults 90

This makes the script start up on runlevels 2-5

To see if all this worked. After a reboot type:

  • ps -A | grep ident2

If it appears you're in business :D

Note there are other ident servers that can accomplish the same task such as fakeidentd and oidentd, you may want to check out them and feel free to write a guide ;)