Translation(s): English

(!) ?Discussion

WARNING:
This page is being edited and is most likely to be inaccurate.

ident2 is an advanced, configurable ident daemon. You can install ident2 using Aptitude or any other frontend to Apt.

aptitude install ident2

To create an init.d script for ident2, use the following command as root:

editor /etc/init.d/ident2

and add the next content into the file:

### BEGIN INIT INFO
# Provides:          ident2
# Required-Start:
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/Stop RFC 1413 ident2 daemon
# 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.
### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="RFC 1413 ident2 daemon"
NAME=ident2
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS=""
PIDFILE=/var/run/identd/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

RETVAL=0

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

exit $RETVAL

After saving the file make it executable with the next command:

chmod +x /etc/init.d/ident2

and use update-rc.d to install the init script links:

update-rc.d ident2 defaults

You can set ident2 to lie, not lie, or not return any response at all, and it is per-user configurable. The admin can specify whether users can configure the type of return they want or not, modifying the DAEMON_ARGS="" line from /etc/init.d/ident2. For more details of the options available see man ident2.

If you are running a debian release >= 8 (Jessie or after) you might have systemd. Then you can just dump this short unit file in /etc/systemd/system/ident2.service:

[Unit]
Description=RFC 1413 ident2 daemon

[Service]
ExecStart=/usr/sbin/ident2
Type=Forking
PIDFile=/var/run/ident2.pid

[Install]
WantedBy=multi-user.target

Append whatever options you want at the end of the ?ExecStart line.