On Tue, 4 Jan, 2000 at 12:32:42AM +0200, [EMAIL PROTECTED] wrote:
>
> Hi everybody,
>
> I want to give each user a fixed IP. To do that I guess I have to mention "local IP:
> remote IP" option in ~user/.ppprc rather than in option.ttyXX file. I have properly
> configured AutoPPP and it works fine but doing the above mentioned thing gives
> IPCP errors with AutoPPP.
>
> Using /etc/ppp/pap-secret file looked to have solved my problem but I was wondering
>why
> it was giving errors when I use "local IP:remote IP" in ~user/.ppprc file.
>
> Any help will be greatly apprecitated.
>
> Prakash.
Your way is not right, I tested it.
File ~user/.ppprc is readed before user is logined,
when user name is not known for the system.
I have solved this problem in another way.
I patched file /pppd/auth.c :
in the function auth_peer_success(...) after line 356: (ppp-2.3.5)
script_setenv("PEERNAME", peer_authname);
insert this text:
/*------------------------------*/
/*
* add options_from_peer_authname
*/
file = _PATH_USERFILES;
path = malloc(strlen(peer_authname) + strlen(file) + 1);
if (path == NULL)
novm("init file name");
strcpy(path, file);
strcat(path, peer_authname);
options_from_file(path, 1, 1, 1);
free(path);
/*------------------------------*/
in the file /pppd/pathnames.h :
/*------------------------------*/
#define _PATH_USERFILES "/etc/ppp/users"
/*------------------------------*/
This new directory contains files with user names per each user.
File format is same like /etc/ppp/options.
In our case it contains one line: local_ip:remote_ip.
pppd will read theese files _after_! user login
and reassign parameters for _this_ logined user.
Luck!
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]