LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Only root can use and connect to the internet (https://www.linuxquestions.org/questions/linux-networking-3/only-root-can-use-and-connect-to-the-internet-175566/)

VerTiCal 04-28-2004 12:18 PM

Only root can use and connect to the internet
 
Uhh... so.. when I try to connect to the internet (with adsl-start),
I get a message that says that only root can run the script.

So, I run the command as root, and it connects successfully.
I can then start chatting at IRC (err, actually not >_< ),
browsing websites, ping computers etc.

But when I change back to my normal user, I cannot use the internet.

Any suggestions?


Distro: Slackware


(I found something here about using sudo, but I get an
syntax error when I try to run it...)

marghorp 04-28-2004 06:21 PM

try setting that command to be run as root. I had a similar problem with dcgui.

The command to use is:

chmod +s adsl-start

Then the command will be run as root no matter who runs it. I don't know if this is a good solution. That is up to gurus to tell you. But it worked for me.

zaphodiv 04-28-2004 09:00 PM

Strange. If you switch to a tty (alt+F1), log in as root, run adsl-start, stay logged in as root, switch to another tty or xwindow, log in as a user and try to use the internet, does it work?

VerTiCal 04-29-2004 12:27 PM

Quote:

Originally posted by marghorp
try setting that command to be run as root. I had a similar problem with dcgui.

The command to use is:

chmod +s adsl-start

Then the command will be run as root no matter who runs it. I don't know if this is a good solution. That is up to gurus to tell you. But it worked for me.

root@bubble:~# chmod -s /usr/sbin/adsl-start
root@bubble:~# login vertical
Password:
vertical@bubble:~$ /usr/sbin/adsl-start
adsl-start: you must be root to run this script

Did'nt work... I also tryed to remove the root-check,
but with no positive results. =/


Quote:

Originally posted by zaphodiv
Strange. If you switch to a tty (alt+F1), log in as root, run adsl-start, stay logged in as root, switch to another tty or xwindow, log in as a user and try to use the internet, does it work?
Still no access to the internet =/

-----------------

But thanks anyway :)

marghorp 04-29-2004 12:32 PM

chmod +s adsl-start

NOT

chmod -s adsl-start

+ gives the command an attribute
- takes away that attribute

VerTiCal 04-29-2004 12:35 PM

Uhh, doh, I'm stupid... :cry:

VerTiCal 04-29-2004 12:38 PM

Still no luck...

vertical@bubble:~$ /usr/sbin/adsl-start
adsl-start: you must be root to run this script

marghorp 04-29-2004 12:47 PM

I don't know then. It works to me even as user. check attributes of /sbin/adsl-start and /usr/sbin/adsl-start

These are two files linked together. Check if any of these has some strange permission settings. Like not being rwxr-xr-x or something.

The adsl-start in /usr/sbin/ is just a link to the file adsl-start in /sbin/

So check that out and tell us what it says.

VerTiCal 04-29-2004 01:02 PM

-rwsr-sr-x

That's it's permissions...


/sbin/adsl-start ... no such file

marghorp 04-29-2004 01:24 PM

try locate adsl-start and tell me what that returns

VerTiCal 04-29-2004 01:29 PM

warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory

marghorp 04-29-2004 01:34 PM

su
<your root password here>
updatedb
locate adsl-start

VerTiCal 04-29-2004 01:35 PM

Uhh...
warning: updatedb: could not open database: /var/lib/slocate/slocate.db: No such file or directory

marghorp 04-29-2004 01:43 PM

I am lost now

You have some biger problems probably.

Time for the gurus to jump in and save the day.

VerTiCal 04-29-2004 01:51 PM

ok, thanks anyway :)


All times are GMT -5. The time now is 11:55 AM.