Subject: Why login behaves different from gety and a session?
To: None <netbsd-help@netbsd.org>
From: Bernd Salbrechter <bernd@mycity.at>
List: netbsd-help
Date: 06/23/1999 00:28:14
Sorry for the secode post, but I forgot to add the scripts.

Hi all!

I have setup a user to retrive and send mails to my provider using pppd.

If I login from the login-prompt it works perfectly open the connection
exchange mails in the queue and terminate the connection. But when I
login from an unprivilegd user "% login mailserever", the connection
stay open until I login as root and kill pppd. What makes the different
here?

I know that pppd uses the first free ppp-line, but I use only one
connection at a time, so I should get allways ppp0 and there is no risk
to kill the wrong pppd. Yes I should make an ip-up script to note the
interface name for closing the connection.

FYI: I append the scripts and /etc/passwd parts.

/home/mailserever/.profile:
PATH=/bin:/usr/bin:/usr/sbin:/usr/pkg/bin
nohup sh mailio 2>&1 > mail.log &
exit

/home/mailserever/mailio:
#! /bin/sh

pppd call mycity-bernd
/sbin/ping -i5 -o -q -Q mail.mycity.at 2> /dev/null
sendmail -q -v
fetchmail
kill `cat /var/run/ppp0.pid`

/etc/passwd:
works:*:101:101::/home/salb:/bin/csh
notwork:*:102:101::/home/brigitte:/bin/csh
mailserver:*:401:400:Distribute mail from bernd@mycity.at:/home/mail/server:/bin/sh

/etc/group:
wheel:*:0:root,work
bin:*:7:work
family:*:101:work,ie-gnu
mailmgt:*:401
From salb Wed Jun 23 00:27:04 1999
To: nnfshome/spool/to_earth/q_ppp
Subject: Why login behaves different from gety and a session?


Sorry for the secode post, but I forgot to add the scripts.

Hi all!

I have setup a user to retrive and send mails to my provider using pppd.

If I login from the login-prompt it works perfectly open the connection
exchange mails in the queue and terminate the connection. But when I
login from an unprivilegd user "% login mailserever", the connection
stay open until I login as root and kill pppd. What makes the different
here?

I know that pppd uses the first free ppp-line, but I use only one
connection at a time, so I should get allways ppp0 and there is no risk
to kill the wrong pppd. Yes I should make an ip-up script to note the
interface name for closing the connection.

FYI: I append the scripts and /etc/passwd parts.

/home/mailserever/.profile:
PATH=/bin:/usr/bin:/usr/sbin:/usr/pkg/bin
nohup sh mailio 2>&1 > mail.log &
exit

/home/mailserever/mailio:
#! /bin/sh

pppd call mycity-bernd
/sbin/ping -i5 -o -q -Q mail.mycity.at 2> /dev/null
sendmail -q -v
fetchmail
kill `cat /var/run/ppp0.pid`

/etc/passwd:
works:*:101:101::/home/salb:/bin/csh
notwork:*:102:101::/home/brigitte:/bin/csh
mailserver:*:401:400:Distribute mail from bernd@mycity.at:/home/mail/server:/bin/sh

/etc/group:
wheel:*:0:root,work
bin:*:7:work
family:*:101:work,ie-gnu
mailmgt:*:401