Welcome, Guest. Please login or register.
April 16, 2014, 18:13:34 PM
Home Help Search Calendar Login Register
Show unread posts since last visit.
News: Let Pardus-Anka become #1: Pardus-Anka Bug ReportPardus-Anka World Google+ | The Pardus wiki  | Visit Pardus-Anka official website  | Register as forum member?  Email the moderator!

+  Pardus Worldforum
|-+  Assistance
| |-+  Configuring Pardus
| | |-+  Help: Only root can use internet
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Help: Only root can use internet  (Read 1621 times)
Dr.U
Newbie
*
Posts: 5


View Profile
« on: July 19, 2007, 13:19:57 PM »

Hi,

I posted this in the German forum but there does not seem to be much action over there. Here is my problem:

I have a DSL modem that is connected to my ethernet card. After installing Pardus 2007.2 I ran (as root user) adsl-setup. No problems occurred and I could then (as root) ping internet addresses such as www.heise.de without any problem. When I try to ping as my normal user I get nothing. When I ping an IP address as the normal user, it works! As a result I cannot use Firefox unless I know the IP address of the site I wish to visit!!

I am writing this from another Linux distro that I happen to have on my computer. I also tried to duplicate in Pardus the various configuration files (in /etc/ppp) that this distro uses but that did not change anything. My guess is that some sort of permissions need to be set somewhere, but I am not expert enough to find the solution.

Please help me as Pardus seems to be an otherwise excellent distro that I would like to use regularly.

Thanks in advance,
  -- Dr.U
Logged
roverrat
Pardus Master
***
Posts: 236



View Profile
« Reply #1 on: July 19, 2007, 20:05:04 PM »

Since you are able to access the internet as an ordinary user using IP numbers the problem seems to be with DNS permissions...

Is your user a member of the dialout group?

Are you using you adsl modem purely as a modem or as a router?
Connecting your pc to the internet with NetworkManager is (as far as I know) only possible if you set up the modem to act as a router. Only then will it be able to give your system a dynamic IP address via DHCP.

Logged
Dr.U
Newbie
*
Posts: 5


View Profile
« Reply #2 on: July 20, 2007, 10:26:33 AM »

Since you are able to access the internet as an ordinary user using IP numbers the problem seems to be with DNS permissions...

Is your user a member of the dialout group?
Thanks for the reply. As I also supposed, the problem seems to be with DNS permissions. My user is a member of the dialout group. I downloaded the "links" program (so the package manager works) and am using it now to write this post (I started it with "sudo links"). As I stated: the root user can ping addresses such as www.whatever.xxx so I think everything has been configured correctly except for the normal user and his permissions. So what do I change to permit my normal user to use the DNS services?

This problem has not happened on any of my other installed Linux distros that I can currently use (Ubuntu, PCLinuxOS, KateOS, etc). So I know that the ADSL modem and the network card can work together without any special configuration work (after all, I got them to work together in these other distros without having to do much of anything other than to run their network or pppoe setup scripts).

Thanks again for the reply,
  -- Dr.U
Logged
Dr.U
Newbie
*
Posts: 5


View Profile
« Reply #3 on: July 20, 2007, 10:27:03 AM »

I have also tried running the adsl-setup script several times but the result is always the same.

Regards,
  -- Dr.U
« Last Edit: July 20, 2007, 10:35:42 AM by Dr.U » Logged
Talisien
Pardus fellow craft
**
Gender: Male
Posts: 55



View Profile
« Reply #4 on: July 20, 2007, 15:40:30 PM »

Hello,

I will discribe how I could connect to Internet by DSL without beeing root.
I use a DSL- modem wich is not a router and wich is connected with eth- card.
First You have to configure Your connection. Open console type in su
You now have to type Your root password. After this type pppoe-setup. Here You put in user name of DSL-Connection.
After this open Pardus -> Programs -> System -> Weitere Programme -> Konqueror (Systemverwaltungsmodus).
Change to directory /etc/ppp/ open the file pppoe.conf with kwrite.

You will see a file looking like the file below:
(search the line with LINUX_PLUGIN= and change to LINUX_PLUGIN=rp-pppoe.so)


#
# pppoe.conf
#
# Configuration file for rp-pppoe.  Edit as appropriate and install in
# /etc/ppp/pppoe.conf
#
# NOTE: This file is used by the pppoe-start, pppoe-stop, pppoe-connect and
#       pppoe-status shell scripts.  It is *not* used in any way by the
#       "pppoe" executable.
#
# Copyright (C) 2000 Roaring Penguin Software Inc.
#
# This file may be distributed under the terms of the GNU General
# Public License.
#
# LIC: GPL
# $Id: pppoe.conf,v 1.11 2005/08/09 02:49:12 dfs Exp $
#******************************************************************************

# When you configure a variable, DO NOT leave spaces around the "=" sign.

# Ethernet card connected to DSL modem
ETH='eth0'

# PPPoE user name.  You may have to supply "@provider.com"  Sympatico
# users in Canada do need to include "@sympatico.ca"
# Sympatico uses PAP authentication.  Make sure /etc/ppp/pap-secrets
# contains the right username/password combination.
# For Magma, use xxyyzz@magma.ca


USER='name' # here You have to put in Your username

# Bring link up on demand?  Default is to leave link up all the time.
# If you want the link to come up on demand, set DEMAND to a number indicating
# the idle time after which the link is brought down.
DEMAND=no
#DEMAND=300

# DNS type: SERVER=obtain from server; SPECIFY=use DNS1 and DNS2;
# NOCHANGE=do not adjust.
DNSTYPE=SERVER

# Obtain DNS server addresses from the peer (recent versions of pppd only)
# In old config files, this used to be called USEPEERDNS.  Changed to
# PEERDNS for better Red Hat compatibility
PEERDNS=yes

DNS1=
DNS2=

# Make the PPPoE connection your default route.  Set to
# DEFAULTROUTE=no if you don't want this.
DEFAULTROUTE=yes

### ONLY TOUCH THE FOLLOWING SETTINGS IF YOU'RE AN EXPERT

# How long pppoe-start waits for a new PPP interface to appear before
# concluding something went wrong.  If you use 0, then pppoe-start
# exits immediately with a successful status and does not wait for the
# link to come up.  Time is in seconds.
#
# WARNING WARNING WARNING:
#
# If you are using rp-pppoe on a physically-inaccessible host, set
# CONNECT_TIMEOUT to 0.  This makes SURE that the machine keeps trying
# to connect forever after pppoe-start is called.  Otherwise, it will
# give out after CONNECT_TIMEOUT seconds and will not attempt to
# connect again, making it impossible to reach.
CONNECT_TIMEOUT=30

# How often in seconds pppoe-start polls to check if link is up
CONNECT_POLL=2

# Specific desired AC Name
ACNAME=

# Specific desired service name
SERVICENAME=

# Character to echo at each poll.  Use PING="" if you don't want
# anything echoed
PING="."

# File where the pppoe-connect script writes its process-ID.
# Three files are actually used:
#   $PIDFILE       contains PID of pppoe-connect script
#   $PIDFILE.pppoe contains PID of pppoe process
#   $PIDFILE.pppd  contains PID of pppd process
CF_BASE=`basename $CONFIG`
PIDFILE="/var/run/$CF_BASE-pppoe.pid"

# Do you want to use synchronous PPP?  "yes" or "no".  "yes" is much
# easier on CPU usage, but may not work for you.  It is safer to use
# "no", but you may want to experiment with "yes".  "yes" is generally
# safe on Linux machines with the n_hdlc line discipline; unsafe on others.
SYNCHRONOUS=no

# Do you want to clamp the MSS?  Here's how to decide:
# - If you have only a SINGLE computer connected to the DSL modem, choose
#   "no".
# - If you have a computer acting as a gateway for a LAN, choose "1412".
#   The setting of 1412 is safe for either setup, but uses slightly more
#   CPU power.
CLAMPMSS=1412
#CLAMPMSS=no

# LCP echo interval and failure count.
LCP_INTERVAL=20
LCP_FAILURE=3

# PPPOE_TIMEOUT should be about 4*LCP_INTERVAL
PPPOE_TIMEOUT=80

# Firewalling: One of NONE, STANDALONE or MASQUERADE
FIREWALL=STANDALONE

# Linux kernel-mode plugin for pppd.  If you want to try the kernel-mode
# plugin, use LINUX_PLUGIN=rp-pppoe.so
LINUX_PLUGIN=rp-pppoe.so

# Any extra arguments to pass to pppoe.  Normally, use a blank string
# like this:
PPPOE_EXTRA=""

# Rumour has it that "Citizen's Communications" with a 3Com
# HomeConnect DSL Modem DualLink requires these extra options:
# PPPOE_EXTRA="-f 3c12:3c13 -S ISP"

# Any extra arguments to pass to pppd.  Normally, use a blank string
# like this:
PPPD_EXTRA=""


########## DON'T CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
# If you wish to COMPLETELY overrride the pppd invocation:
# Example:
# OVERRIDE_PPPD_COMMAND="pppd call dsl"

# If you want pppoe-connect to exit when connection drops:
# RETRY_ON_FAILURE=no



Save the file.
Now you have to change with konqueror to the directory /etc/.
Open the file sudoers with kwrite.

You have to put in this:
# Allow members of the group "dialout" to connect to the internet:
%dialout   ALL=(ALL)       NOPASSWD: /usr/sbin/pppoe-start, /usr/sbin/pppoe-stop
After this the file has to look like the file below (save the file):

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Runas alias specification

# User privilege specification
root   ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
%wheel   ALL=(ALL)   ALL

# Allow members of the group "dialout" to connect to the internet:
%dialout   ALL=(ALL)       NOPASSWD: /usr/sbin/pppoe-start, /usr/sbin/pppoe-stop

# Same thing without a password
#%wheel   ALL=(ALL)   NOPASSWD: ALL



Now you can leave konqueror in root modus.
Now You are able to make a Batch- file or script-file wich is executible.
Open kwrite
Into the white paper You put in this:

#! /bin/bash
# DSL- Verbindung einschalten
sudo /usr/sbin/pppoe-connect


save the file for example: /home/dokumente/meine_scripte/dsl+.
Open a new file put in this:

#! /bin/bash
# DSL- Verbindung ausschalten
sudo /usr/sbin/pppoe-stop


save the file for example like this: /home/dokumente/meine_scripte/dsl-.
Now You have to make the files executible. You have to open konqueror and look for the files (/mypath/dsl+  and  /mypath/dsl-). Right mouseklick to the file. Klick Eigenschaften -> Berechtigung. Change everything to read and write and Klick bottom executible.
After this Your bash-system has to know where the Path to this files is. You can  manage like this:
Open konqueror. Go to Your home- directory. In konqueror You have to klick Ansicht -> Versteckte Dateien anzeigen. Now You will see a file named .bashrc. Open this file with kwrite.
put in this line: export PATH=$PATH":/home/dokumente/meine_scripte"
The file .bashrc now looks like this:

# /etc/skel/.bashrc:
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output.

source /etc/profile

# Get DBUS Session's properties
if [[ -f ~/.dbus-session ]]; then
    source ~/.dbus-session
fi

# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]]; then
   # Shell is non-interactive.  Be done now
   return
fi

# Shell is interactive.  It is okay to produce output at this point,
# though this example doesn't produce any.  Do setup for
# command-line interactivity.

# colors for ls, etc.  Prefer ~/.dir_colors #64489
if [[ -f ~/.dir_colors ]]; then
   eval `dircolors -b ~/.dir_colors`
else
   eval `dircolors -b /etc/DIR_COLORS`
fi

alias d="ls --color"
alias dir="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"
alias la="ls --color -la"
alias cls="clear"
alias cd..="cd .."
alias rm="rm -i"
alias mv="mv -i"
alias cp="cp -i"
alias müll="shred -f -v -u"
alias svn="colorsvn"

export PATH=$PATH":/home/dokumente/meine_scripte"

# Change the window title of X terminals
case $TERM in
   xterm*|rxvt|Eterm|eterm)
      PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
      ;;
   screen)
      PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
      ;;
esac

source /etc/bashrc

export GTK2_RC_FILES=$HOME/.gtkrc-2.0


Change also in the same way (for this You have to be root) the bashrc- files in:
/etc/bash/bashrc
and
/etc/skel/.bashrc

Now You are able to connect to Internet like this:
open console type dsl+
push ENTER- Key
or Klick Pardus -> Befehl ausführen. Put in /home/dokumente/meine_scripte/dsl+ then push ENTER-Key.

To disconnect Internet:
open console type dsl-
push ENTER- Key
Klick Pardus -> Befehl ausführen. Put in /home/dokumente/meine_scripte/dsl- then push ENTER-Key.

Hope this can help.

Greatings

Wolfgang
Logged
Dr.U
Newbie
*
Posts: 5


View Profile
« Reply #5 on: July 20, 2007, 19:17:12 PM »

Hello and thank you for your detailed suggestions, Talisien!!!!

I did what you suggested but, unfortunately, that did not solve the problem  Undecided  As the normal user I can do

 ping 130.244.127.161

(or use any other IP address of the form aaa.bbb.ccc.ddd) with success, but if I try

 ping www.anywhere.xyz

(for example www.heise.de) it fails ("unknown host www.anywhere.xyz" as I recall). But if I then do

 sudo ping www.anywhere.xyz

I have success  Shocked  The same goes for running the links text-browser or also for firefox: www-pages can only be called up when running the programs with sudo, but when run as the normal user pages can only be accessed when the IP address is given as the URL.

So actually everything works perfectly, but only for the root user (that is, for sudo executions). And if I know the IP address, then everything also works for the normal user.

I had hopes that the rp-pppoe.so entry in pppoe.conf file would do the trick, but it was in vain. Any other suggestions  Huh?

Regards,
  -- Dr.U
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!