View previous topic :: View next topic |
Author |
Message |
planetsheinker Guru
Joined: 26 Feb 2004 Posts: 403 Location: Israel
|
Posted: Sat Nov 06, 2004 7:36 pm Post subject: Sertain commands I cant ran as regular user, why? |
|
|
I am able to run these comands only as root:
adsl-atart
adsl-status
adsl-stop
ping
And I think that is the reason I am not being able to get internet access when runnig a web browser. |
|
Back to top |
|
|
eelke Guru
Joined: 17 May 2004 Posts: 406 Location: Earth, Netherlands, Friesland
|
Posted: Sat Nov 06, 2004 8:04 pm Post subject: |
|
|
I don't know about these adsl commands but ping has normally the set userid flag set. you can check this by doing:
It should give you something like this
Code: | -rws--x--x 1 root root 35728 Jul 3 09:15 /bin/ping |
If your output has an x instead of an s in -rws--x--x the set userid bit is missing. You can add it as root by issueing the command chmod u+s /bin/ping. |
|
Back to top |
|
|
planetsheinker Guru
Joined: 26 Feb 2004 Posts: 403 Location: Israel
|
Posted: Sat Nov 06, 2004 8:16 pm Post subject: |
|
|
eelke wrote: | I don't know about these adsl commands but ping has normally the set userid flag set. you can check this by doing:
It should give you something like this
Code: | -rws--x--x 1 root root 35728 Jul 3 09:15 /bin/ping |
If your output has an x instead of an s in -rws--x--x the set userid bit is missing. You can add it as root by issueing the command chmod u+s /bin/ping. |
The ls -l /bin/ping says what you said it would: -rws--x--x |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20588
|
Posted: Sat Nov 06, 2004 9:35 pm Post subject: |
|
|
Moved from Other Things Gentoo. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
OdinsDream Veteran
Joined: 01 Jun 2002 Posts: 1057
|
Posted: Sun Nov 07, 2004 4:16 am Post subject: |
|
|
When you say you can't run ping unless you're root, do you mean that this happens:
Code: |
odinsdream@farscapeone odinsdream $ ping google.com
-bash: ping: command not found
odinsdream@farscapeone odinsdream $
|
...?
Or do you mean that this happens:
Code: |
odinsdream@farscapeone odinsdream $ ping google.com
ping: unknown host google.com
odinsdream@farscapeone odinsdream $
|
...The first thing would be what you'd see if you really weren't able to run ping as a regular user. That's not what you should be seeing. If you're instead seeing the second thing, then ping is running fine, but it's showing you an error message about whatever you asked it to do. In the latter case, your problem is instead your network connection (which, I suspect is what's going on, seeing as your other thread deals with this) _________________ s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi
Don't blame me. I didn't vote for him.
http://john.simplykiwi.com |
|
Back to top |
|
|
planetsheinker Guru
Joined: 26 Feb 2004 Posts: 403 Location: Israel
|
Posted: Sun Nov 07, 2004 8:11 am Post subject: |
|
|
Quote: |
Code: |
odinsdream@farscapeone odinsdream $ ping google.com
ping: unknown host google.com
odinsdream@farscapeone odinsdream $
|
|
This what happens, but only if I run it as regular user,
if I run it as root, all is fine. |
|
Back to top |
|
|
OdinsDream Veteran
Joined: 01 Jun 2002 Posts: 1057
|
Posted: Tue Nov 09, 2004 1:16 am Post subject: |
|
|
Ok, then ping is working, networking is your problem. What is in your /etc/resolv.conf ? _________________ s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi
Don't blame me. I didn't vote for him.
http://john.simplykiwi.com |
|
Back to top |
|
|
neuron Advocate
Joined: 28 May 2002 Posts: 2371
|
Posted: Tue Nov 09, 2004 1:51 am Post subject: |
|
|
See if /etc/resolv.conf is readable only by root |
|
Back to top |
|
|
OdinsDream Veteran
Joined: 01 Jun 2002 Posts: 1057
|
Posted: Tue Nov 09, 2004 2:47 am Post subject: |
|
|
Try doing: ls -alh /etc/resolv.conf
You should see: Code: |
-rw-r--r-- 1 root root 43 Jul 20 17:34 /etc/resolv.conf
|
_________________ s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi
Don't blame me. I didn't vote for him.
http://john.simplykiwi.com |
|
Back to top |
|
|
planetsheinker Guru
Joined: 26 Feb 2004 Posts: 403 Location: Israel
|
Posted: Tue Nov 09, 2004 9:13 am Post subject: |
|
|
Problem solved
Code: | chmod 777 /etc/ppp/resolv.conf |
Thanks every one |
|
Back to top |
|
|
neuron Advocate
Joined: 28 May 2002 Posts: 2371
|
Posted: Tue Nov 09, 2004 12:19 pm Post subject: |
|
|
777 means read write by all users, this also means any user could remove the file if he/she wanted it.
644 is more sane.
(that's read write, read, read)
you could also do
chmod a-x resolv.conf (remove executable bit)
chmod go-w resolv.conf (remove write for group and other) |
|
Back to top |
|
|
planetsheinker Guru
Joined: 26 Feb 2004 Posts: 403 Location: Israel
|
Posted: Tue Nov 09, 2004 12:26 pm Post subject: |
|
|
Yea I know 777 is read write for all users, and that just the way I want it |
|
Back to top |
|
|
|