Setting up PPP dial-in server WITH script

I want to provide PPP to dialin users, using a login script. I'm running mgetty+sendfax 1.1.9 with AutoPPP enabled, and this works. To let Win311 users dial in as well, I want to let them login as Pusernam, followed by the password. I do not want to let them login and issue a command afterwards, because most of the users already have a loginscript that works in the manner mentioned above. Mgetty has the option to detect a capital in front of the username, for instance to provide UUCP services. Problem is that pppd isn't able to ask a user for his password like UUCICO can. So what I need is probably some modified login binary, which strips the 'P', asks for the password, and starts PPP instead of the regular shell mentioned in /etc/password. Ofcourse, this shell _should_ be started if the username doesn't start with a 'P'..
LVL 2
alexbikAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hnoCommented:
Set up special PPP login accounts with pppd as login shell. The users can then do a normal login, but instead of getting a shell promt PPP is automatically started.



0
alexbikAuthor Commented:
Hi hno,

I cannot give the users ppp as a shell, because of two reasons:
1) The users who cannot use PAP already have loginscripts that work in the above described manner,

2) Users who dial in already have a shell that I do not want to replace, because it gives them the option to change their passwords.

I _do_ have a solution at this moment (that's why I do not want to change the way things work, because it would mean that all users will have to change their loginscripts) but it uses a login binary which is patched by someone to implement this feature. Since I do not trust this person to be one of the greatest programmers (understatement of the year), I am not convinced this provides a high level of security..

Alex.
0
alexbikAuthor Commented:
Hi hno,

I cannot give the users ppp as a shell, because of two reasons:
1) The users who cannot use PAP already have loginscripts that work in the above described manner,

2) Users who dial in already have a shell that I do not want to replace, because it gives them the option to change their passwords.

I _do_ have a solution at this moment (that's why I do not want to change the way things work, because it would mean that all users will have to change their loginscripts) but it uses a login binary which is patched by someone to implement this feature. Since I do not trust this person to be one of the greatest programmers (understatement of the year), I am not convinced this provides a high level of security..

Alex.
0
hnoCommented:
What I ment is that you create new accounts for the users, in parallell with the existing shell accounts, but with a P in front of the user name. This special account uses pppd as shell but has the same UID,GID,HOME as the regular shell login.

But if you only want to use one account (easier to maintain and only one password for shell and PPP login), then you have to use a different login program. If you do not want to write a new one from scratch you can use a small wrapper around /bin/login

-------------------------------
#!/bin/sh
IFS=
PPP=1 exec /bin/login -p ${1#P}
-------------------------------
and then check for PPP in /etc/profile or similar place, and if set do "exec pppd".

if [ -n "$PPP" ]; then
  exec pppd
fi

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
alexbikAuthor Commented:
Sorry I didn't repy earlier.
Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.