Reply
Thread Tools
Posts: 385 | Thanked: 426 times | Joined on Dec 2009 @ Gothenburg, Sweden
#11
@MohammadAG: Oh, didn't know that really. I saw that that command exists now, but ok, good to know. What's the reason? Shouldn't that be the safe way with the file locking and all that?
 

The Following User Says Thank You to Larswad For This Useful Post:
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#12
Originally Posted by MohammadAG View Post
I thought visudo should never be used on maemo...
True, the Right Way(TM) to do it is via /etc/sudoers.d and update-sudoers, sorry for giving bad advice.

BTW the warnings on the wiki seem a bit bogus to me - the real reason for not using visudo is that your changes will be lost the next time update-sudoers runs. If order can break things, this can happen just as easily with an unfortunately named /etc/sudoers.d file.
 

The Following 2 Users Say Thank You to lma For This Useful Post:
Posts: 385 | Thanked: 426 times | Joined on Dec 2009 @ Gothenburg, Sweden
#13
Ok, honestly grateful for the safety advice and all! But still, it vexes me that I have not yet found out how to ping as 'user' without having to use sudo.
It should be possible to do right?
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#14
Originally Posted by Larswad View Post
But still, it vexes me that I have not yet found out how to ping as 'user' without having to use sudo.
It should be possible to do right?
Not with the built-in ping. The problem is that it's really just a symlink to busybox, and if you make that suid root that will apply to all busybox applets which is almost certainly not what you want.

There are a number of other packages that provide alternatives you can try. Note that the "ping" package isn't installed suid either (but you could chmod it without any problems).
 

The Following User Says Thank You to lma For This Useful Post:
Posts: 385 | Thanked: 426 times | Joined on Dec 2009 @ Gothenburg, Sweden
#15
@lma: Thanks, I had totally missed that ping was part of the busybox too...darned, I should have checked. I just assumed that it was separated. And your are of course right, I would never want to make all the busybox stuff being accessible to any user. Great that you pointed that out because it totally went by me.
Guess I'll try one of the external ones then. Kinda hard to know though what ping that would be the best...to many to choose from.

But ok, back to the issue at hand: If the ping I choose to install is root only, wouldn't I better then add that one in a sudoers script instead of chmod'in the binary?
 
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#16
"sudo ping" and "rootsh ping" both work for me (using rootsh 1.5). I'd like to be able to do it as user though.
__________________
"Impossible is not in the Maemo vocabulary" - Caballero
 
Posts: 176 | Thanked: 110 times | Joined on Jul 2010
#17
Noob question what is ping and how can it better my life?
 
Posts: 992 | Thanked: 738 times | Joined on Jun 2010 @ Low Earth Orbit
#18
Add:

Code:
alias ping="sudo ping"
to /home/user/.profile
 

The Following User Says Thank You to kureyon For This Useful Post:
Posts: 385 | Thanked: 426 times | Joined on Dec 2009 @ Gothenburg, Sweden
#19
@Jigzy: It's a little bit like the submarine movie "Hunt for Red October", but geek version. Say you want to know whether a computer on the net is "alive" and responds, you then send a little ping to it. Its in fact a small designated packet of a few bytes (at a minimum 40). If the pinged computer receives the packet it responds with a 'pong' packet as quickly as possible. However, not all computers (or routers for that matter) respond to ping due to security reasons. It is something that each computer desides whether to allow.
Ping is also a way to find out the responsiveness of a different computer on the net. The longer time it takes to receive the ping, it is likely that it will take time to communicate with it in any other way.

@GameboyRMH: I installed 'fping' went root and I chmod'ed the binary (/usr/local/sbin/fping) with 4755.
That works, I would however have preferred to do this with sudoers since I guess that's the right way.

@kureyon: Yes, that of course! It works also and thanks. But I was a little into having this working with sudoers.

Last edited by Larswad; 2010-11-24 at 13:49.
 

The Following User Says Thank You to Larswad For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 14:09.