PPPOE 命令行方式使用有什么方法在连接时手动输入密码而非把密码写入文件?
发表于 : 2017-09-17 19:53
PPPOE 命令行方式使用有什么方法在连接时手动输入密码而非把密码写入文件?
感谢解答九天星 写了:更改PPPOE的配置文件的使用权限
代码: 全选
cat ./dsl-provider(即根据用户输入临时生成option到标准输出的脚本) > ./txfifo & sudo /usr/sbin/pppd file ./txfifo
科学之子 写了:感谢解答九天星 写了:更改PPPOE的配置文件的使用权限
您的回帖让我更进一步思考.
如果真的有需要:txfifo 是用mkfifo创建的命名管道文件.代码: 全选
cat ./dsl-provider(即根据用户输入临时生成option到标准输出的脚本) > ./txfifo & sudo /usr/sbin/pppd file ./txfifo
参考:man pppd
但是改配置文件权限是没用的,因为硬盘到别人手里之后随便挂载就看到存储在硬盘文件上的密码了.
但我以前的用法只是用pppoeconf写入密码到配置文件,然后pon.九天星 写了:首先要解决的是密码写入了哪个配置文件,然后修改该配置文件,取消此文件的可写权限。即然都是不可写入了,把硬盘拿到哪里还能看得到密码呢?
代码: 全选
/etc/ppp/chap-secrets
Names, secrets and IP addresses for CHAP/MS-CHAP/MS-CHAPv2 authentication. As for /etc/ppp/pap-secrets, this file should be owned by root and not readable or
writable by any other user. Pppd will log a warning if this is not the case.
/etc/ppp/srp-secrets
Names, secrets, and IP addresses for EAP authentication. As for /etc/ppp/pap-secrets, this file should be owned by root and not readable or writable by any
other user. Pppd will log a warning if this is not the case.