LINUX.ORG.RU
ФорумAdmin

/etc/ppp/auth-up format


0

0

я пытаюсь решить проблему autoPPP d в логах... mgetty[12354]: data dev=ttyM6, pid=12354, caller='none', conn='57600', name='', cmd='/usr/sbin/pppd', user='/AutoPPP/' <-- вот это мне не нравится, т.к. на некоторых польз. оно их имена не пишет

[root@inet ppp]# cat auth-up #!/bin/bash

LOGFILE=/tmp/$0.log DATE=`date "+%k:%M:%S %d.%m.%Y"` echo $DATE $* >> $LOGFILE

в манах написано

/etc/ppp/auth-up A program or script which is executed after the remote system successfully authenticates itself. It is executed with the parameters

interface-name peer-name user-name tty-device speed

Note that this script is not executed if the peer doesn't authenticate itself, for example when the noauth option is used.

но в логах inet pppd[12429]: Can't execute /etc/ppp/auth-up: Exec format error

вопрос: в каком таком формате должен быть сабж?? или что я не так делаю?

anonymous

вот как у меня (RedHat 7.1):
$ ls -l auth-*
-rwxr-xr-x 1 root root 594 Мар 29 01:41 auth-down
-rwxr-xr-x 1 root root 601 Янв 26 2003 auth-up
-rwxr-xr-x 1 root root 1518 Янв 26 2003 accounts.sh

[ppp]$ cat auth-up
#!/bin/sh
#
# A program or script which is executed after the remote system
# successfully authenticates itself. It is executed with the parameters
# <interface-name> <peer-name> <user-name> <tty-device> <speed>
#

#
# The environment is cleared before executing this script
# so the path must be reset
#
PATH=/usr/sbin:/sbin:/usr/bin:/bin
export PATH

echo auth-up `date +'%y/%m/%d %T'` $* >> /var/log/pppstats

# last line

[ppp]$ cat auth-down
#!/bin/sh
#
# A program or script which is executed after the remote system
# successfully authenticates itself. It is executed with the parameters
# <interface-name> <peer-name> <user-name> <tty-device> <speed>
#

#
# The environment is cleared before executing this script
# so the path must be reset
#
PATH=/usr/sbin:/sbin:/usr/bin:/bin
export PATH

echo auth-down `date +'%y/%m/%d %T'` $* $BYTES_SENT $BYTES_RCVD $CONNECT_TIME $[($BYTES_SENT+$BYTES_RCVD)/$CONNECT_TIME] >> /var/log/pppstats

[ -x /etc/ppp/accounts.sh ] && /etc/ppp/accounts.sh "$@"

# last line


[ppp]$ cat accounts.sh
#занесение в базу, подсчёт балланса и прочее
#last line

DiMoN ★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.