Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
what happened to sudo?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tone33
n00b
n00b


Joined: 13 Sep 2008
Posts: 38

PostPosted: Sun Sep 21, 2008 12:26 pm    Post subject: what happened to sudo? Reply with quote

I'm running KDE 3.5.9 and when I open Konsole and

Code:
ifconfig


doesn't work. I think I need to add /sbin/ifconfig to my path - how do i do that?

I also notice that if i su to root first it then works, but if I try do it in one line like this it doesnt

Code:
su ifconfig
Back to top
View user's profile Send private message
barbar
Guru
Guru


Joined: 16 Apr 2003
Posts: 397
Location: Austria

PostPosted: Sun Sep 21, 2008 12:53 pm    Post subject: Reply with quote

All files in /sbin are owned by root. ifconfig is not to be executed by any other user than root. To run ifconfig either open a konsole as root. You can also use sudo.
Back to top
View user's profile Send private message
tone33
n00b
n00b


Joined: 13 Sep 2008
Posts: 38

PostPosted: Sun Sep 21, 2008 1:09 pm    Post subject: Reply with quote

ah ok. but this doesn't work:

Code:
tone@desktop-gentoo ~ $ sudo ifconfig
bash: sudo: command not found
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Sun Sep 21, 2008 1:21 pm    Post subject: Reply with quote

Well, sudo isn't installed by default, so are you really sure, you've got it installed? If not `emerge app-admin/sudo` and configure it properly.
Back to top
View user's profile Send private message
tone33
n00b
n00b


Joined: 13 Sep 2008
Posts: 38

PostPosted: Sun Sep 21, 2008 8:41 pm    Post subject: Reply with quote

ok understood. I'm still a noob so still learning some basic things. Question: why would i want to install sudo when i can just use su?
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Mon Sep 22, 2008 12:10 pm    Post subject: Reply with quote

Quote:
Question: why would i want to install sudo when i can just use su?


Well, for one, you can configure it so that you don't need to enter your root-pwd for all/certain task - can be handy, but can also be a security-risk.

If you're the only user and "su" isn't too much hassle for you, I'd just stay with it. On the other hand, if there are also some other users and you want them to be able to do some tasks only root is allowed to, sudo is surely better than putting anyone in group wheel.
Back to top
View user's profile Send private message
tone33
n00b
n00b


Joined: 13 Sep 2008
Posts: 38

PostPosted: Sun Sep 28, 2008 1:42 am    Post subject: Reply with quote

ok, thanks for the clarification. I'll just stick with su. no need for sudo. It came preinstalled with ubuntu, which is about the extent of my previous linux experience at this point.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Sun Sep 28, 2008 2:51 am    Post subject: Reply with quote

Since you want to use su, you will need to use it like this:
Code:
su -c "<command>"

_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Sun Sep 28, 2008 3:33 pm    Post subject: Reply with quote

in the case of ifconfig, specifically, as a normal user just use the full path
Code:
/sbin/ifconfig eth0

its not in your PATH bacause it shouldn't be but a user can execute the command.
Back to top
View user's profile Send private message
<3
Veteran
Veteran


Joined: 21 Oct 2004
Posts: 1081

PostPosted: Sun Sep 28, 2008 4:16 pm    Post subject: Reply with quote

I'd highly recommend reading the gentoo sudo(ers) guide it gives a short explaination of what sudo is and how to properly configure it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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