KPPP asking for root password all the time

Markus Deistler yellowdog-newbie@lists.terrasoftsolutions.com
07 Feb 2003 04:22:16 +0000


On Tue, 2003-02-04 Casey Coble wrote 

> i have a blueberry ibook with yd 2.3 installed and everytime i need to
> connect to the internet i have to give KPPP my root password.  Is there
> anyway around this?

Good question, kppp is now "pamified" .... three answers: 

1) On a single-user-machine there is a simple way to avoid being asked
for the root password, you may change the line 

auth   sufficient    /lib/security/pam_rootok.so 

in /etc/pam.d/kppp to 

auth   sufficient    /lib/security/pam_permit.so 

Then everybody can run kppp with no questions asked. If the kppp's
configuration is changed, it will affect all users
('/root/.kde/share/config/kppprc' is used).

2) If you wish to keep the pam-restrictions for kppp, but to allow
certain users to run kppp, you might first create the following entry in
/etc/sudoers (you have to run the command '/usr/sbin/visudo' as root for
editing that file, that will start the editor 'vi' in a special mode.
Don't issue a command like 
'pico OR emacs OR vi /etc/sudoers' !!): 

# User alias specification 
User_Alias    KPPPUSERS = fred,george  # [loginnames!] 

... 

# User privilege specification 
root       ALL = (ALL) ALL 
KPPPUSERS  ALL = NOPASSWD: /usr/bin/kppp

>From now on you can start xterm or the KDE-terminal and issue 
'sudo kppp' at the command line and kppp will appear without any
root-password given ...; Finally you may put that command into the
KDE-menu: 
Go to the KDE-menu and look for the menu entry "System", then look for
submenu entry "Menu Editor" which is the KDE-utility to customize the
KDE-menu. Once the "Menu Editor" is opened look for the KPPP-entry (it
is a submenu of "Internet"). To the right you will see which command is
really run if you choose KPPP in the KDE-menu. Change 'kppp %i %m' to
'sudo kppp %i %m'. It worked for me.

Again any configuration of kppp is stored in
'/root/.kde/share/config/kppprc' 

3) In '/usr/bin/' Remove the symlink 
'kppp --> /usr/bin/consolehelper' and create a new symlink 
'kppp --> /usr/sbin/kppp'     
Create a new group (eg 'dialout' in '/etc/group'), add any user you'll
grant kppp-access and issue 
'cd /usr/sbin/' 
'chown root:dialout kppp' 
'chmod 4750 kppp'
Now kppp is run by your "own" KDE (not by root's KDE), so everything
gets stored in 
'~/.kde/share/config/kppprc'! If you configured kppp before, you may
copy the kppprc-file from '/root/.kde/share/config/kppprc'. 


Best Regards, Markus