Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sertain commands I cant ran as regular user, why?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
planetsheinker
Guru
Guru


Joined: 26 Feb 2004
Posts: 403
Location: Israel

PostPosted: Sat Nov 06, 2004 7:36 pm    Post subject: Sertain commands I cant ran as regular user, why? Reply with quote

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
View user's profile Send private message
eelke
Guru
Guru


Joined: 17 May 2004
Posts: 406
Location: Earth, Netherlands, Friesland

PostPosted: Sat Nov 06, 2004 8:04 pm    Post subject: Reply with quote

I don't know about these adsl commands but ping has normally the set userid flag set. you can check this by doing:

Code:
ls -l /bin/ping


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
View user's profile Send private message
planetsheinker
Guru
Guru


Joined: 26 Feb 2004
Posts: 403
Location: Israel

PostPosted: Sat Nov 06, 2004 8:16 pm    Post subject: Reply with quote

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:

Code:
ls -l /bin/ping


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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20588

PostPosted: Sat Nov 06, 2004 9:35 pm    Post subject: Reply with quote

Moved from Other Things Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Sun Nov 07, 2004 4:16 am    Post subject: Reply with quote

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
View user's profile Send private message
planetsheinker
Guru
Guru


Joined: 26 Feb 2004
Posts: 403
Location: Israel

PostPosted: Sun Nov 07, 2004 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Tue Nov 09, 2004 1:16 am    Post subject: Reply with quote

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
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Tue Nov 09, 2004 1:51 am    Post subject: Reply with quote

See if /etc/resolv.conf is readable only by root :)
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Tue Nov 09, 2004 2:47 am    Post subject: Reply with quote

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
View user's profile Send private message
planetsheinker
Guru
Guru


Joined: 26 Feb 2004
Posts: 403
Location: Israel

PostPosted: Tue Nov 09, 2004 9:13 am    Post subject: Reply with quote

Problem solved :-)
Code:
chmod 777 /etc/ppp/resolv.conf

Thanks every one :-)
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Tue Nov 09, 2004 12:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
planetsheinker
Guru
Guru


Joined: 26 Feb 2004
Posts: 403
Location: Israel

PostPosted: Tue Nov 09, 2004 12:26 pm    Post subject: Reply with quote

Yea I know 777 is read write for all users, and that just the way I want it :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum