Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
seasonsOffline
15 Post subject: sudo vs. su/root (fixed)  PostPosted: 25.08.2011, 21:03



Joined: 2010-09-13
Posts: 92

Status: Offline
I got my Linux start with Ubuntu and unfortunately, got in the habit of using sudo for everything and not having a root account. After upgrading to the latest sudo package, my user's $PATH variable no longer points to /usr/sbin and thus, I can't do package management involving ldconfig using sudo. I'm sure this is in line with Debian/POSIX policy, and I approve wholeheartedly. I know how to hack around this as well, but I'm not sure if it's a good idea.

So my questions is: Should I not use sudo and use su/root prompt more often?
What is the aptosid community's take on it?
 
 View user's profile Send private message  
Reply with quote Back to top
BTOffline
Post subject: RE: sudo vs. su/root  PostPosted: 25.08.2011, 21:23



Joined: 2010-09-12
Posts: 36
Location: Belgium
Status: Offline
hello seasons,

please have a look at our manual :

http://manual.aptosid.com/en/term-konsole-en.htm

sudo is not the good way to go for aptosid

BT
 
 View user's profile Send private message  
Reply with quote Back to top
hubiOffline
Post subject: RE: sudo vs. su/root  PostPosted: 25.08.2011, 22:09
Moderator


Joined: 2010-09-11
Posts: 228
Location: Vienna (AT)
Status: Offline
Just say "No" if an update wants to change your custom settings back to default.

And as BT is saying: we don't recommend it. At work (I am not the admin) we have a set of 20 computers running dualboot with Windows XP and Ubuntu, anyone using Ubuntu could trash the PC he/she is working on because of sudo and the lazy admin settings. Well ... it's not critical, it's just a school, and the computers are used for teaching ... but!

I talked to the admin, and he might change it if he finds time (schools don't pay for admin work here!), but he had to switch to Ubuntu because the kids wanted it (they just know Ubuntu). The admin himself is a Debian user. Sad

hubi

_________________
Tilos Rádió Budapest
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
seasonsOffline
Post subject: Re: RE: sudo vs. su/root  PostPosted: 25.08.2011, 22:40



Joined: 2010-09-13
Posts: 92

Status: Offline
      BT wrote:
hello seasons,
please have a look at our manual :


Thanks for the obligatory RTFM post, but I expected to find it under System Administration. Oh well..

Yeah, I guess I'll have to break the habit of sudo and use su more. I shouldn't insult my own intelligence...
 
 View user's profile Send private message  
Reply with quote Back to top
piperOffline
Post subject: RE: Re: RE: sudo vs. su/root  PostPosted: 25.08.2011, 23:10
Moderator


Joined: 2010-09-11
Posts: 480
Location: cheektowaga, ny
Status: Offline
su --> login as root

sudo --> run as root

With su you're talking permissions, owners, groups

With sudo you're talking sudoers, list of people who can run things "without being root" or "having permissions on the files"



http://www.google.com/linux?q=differnce ... udo+and+su

_________________
debian sid | apt-get into it
 
 View user's profile Send private message  
Reply with quote Back to top
seasonsOffline
Post subject: Re: RE: Re: RE: sudo vs. su/root  PostPosted: 25.08.2011, 23:26



Joined: 2010-09-13
Posts: 92

Status: Offline
      piper wrote:
<stuff>

Thanks, I already knew that <stuff> though. I guess what I'm really wondering is why the /sbin got removed in the default config just now?

      Quote:
Just say "No" if an update wants to change your custom settings back to default.

I thought I did, but it was before morning coffee, so... Confused
 
 View user's profile Send private message  
Reply with quote Back to top
hubiOffline
Post subject: Re: RE: sudo vs. su/root  PostPosted: 25.08.2011, 23:26
Moderator


Joined: 2010-09-11
Posts: 228
Location: Vienna (AT)
Status: Offline
      seasons wrote:
RTFM

Implying a rudeness stating "RTFM" is surely cool. But actually that means WTWFSFMPA: "write the whole fucking shit for me personally again".

No offence.

hubi

_________________
Tilos Rádió Budapest
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
seasonsOffline
Post subject: RE: Re: RE: sudo vs. su/root  PostPosted: 26.08.2011, 01:47



Joined: 2010-09-13
Posts: 92

Status: Offline
Yeah, I apologize for implying rudeness when the poster actually answered the original question I posed. I guess if I really want the answer to my question, I'll have to dig through the changelog/bug reports. Thanks anyway.
 
 View user's profile Send private message  
Reply with quote Back to top
hubiOffline
Post subject: RE: Re: RE: sudo vs. su/root  PostPosted: 26.08.2011, 06:14
Moderator


Joined: 2010-09-11
Posts: 228
Location: Vienna (AT)
Status: Offline
@seasons

The answer is, as I stated: during the update you were asked if you want to replace your configuration by the new package or not. The answer is N (no) or just hit enter (because that's default). If you type Y (yes), your configuration is gone.

I am quite convinced that you typed Y and hit enter.

hubi

_________________
Tilos Rádió Budapest
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
DonKultOffline
Post subject: RE: Re: RE: sudo vs. su/root  PostPosted: 26.08.2011, 08:26
Team Member


Joined: 2010-09-02
Posts: 481

Status: Offline
Just for the record: For me /sbin and /usr/sbin were never in $PATH for a user -- as (suprise suprise) a user can't execute programs in it so its useless to make them available in tab-completion.

Further more as you said you can't do package management: apt-get and friends are not in /usr/sbin.

And last but not least: If you do tab-tab after sudo, it's not the bash doing it's usual tab-completion here but the specific bash-completion for sudo. So I would ensure first that the bash-completion is actually loaded…
(It would be a surprise if sudo in its completion doesn't include sbin's…)

_________________
MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
piperOffline
Post subject: Re: RE: sudo vs. su/root  PostPosted: 26.08.2011, 16:29
Moderator


Joined: 2010-09-11
Posts: 480
Location: cheektowaga, ny
Status: Offline
      hubi wrote:
      seasons wrote:
RTFM

Implying a rudeness stating "RTFM" is surely cool. But actually that means WTWFSFMPA: "write the whole fucking shit for me personally again".

No offence.

hubi


+1 Wink

_________________
debian sid | apt-get into it
 
 View user's profile Send private message  
Reply with quote Back to top
seasonsOffline
Post subject: Re: RE: Re: RE: sudo vs. su/root  PostPosted: 26.08.2011, 18:42



Joined: 2010-09-13
Posts: 92

Status: Offline
      hubi wrote:
@seasons
The answer is, as I stated: during the update you were asked if you want to replace your configuration by the new package or not. The answer is N (no) or just hit enter (because that's default). If you type Y (yes), your configuration is gone.
I am quite convinced that you typed Y and hit enter.
hubi


Actually, I confirmed that I did indeed keep the old configuration, which is what's causing the issue. The sudoers file now includes this line:
      Code:
Defaults   secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
 
 View user's profile Send private message  
Reply with quote Back to top
myloOffline
Post subject: Re: RE: Re: RE: sudo vs. su/root  PostPosted: 26.08.2011, 21:23



Joined: 2010-09-11
Posts: 116
Location: Wiesbaden, Germany
Status: Offline
      piper wrote:
su --> login as root

sudo --> run as root

...


and to complete:

kdeesu ++> ???

_________________
Regards
mylo

Linux 3.1-6.slh.1-aptosid-amd64 x86_64[2010-03 Ἀπάτη (201012262151)]
Intel Core2 Duo E6550 @ Cache/Ram 4MB/4GB nVidia G72 7300 nouveau 2*250GB
 
 View user's profile Send private message  
Reply with quote Back to top
hubiOffline
Post subject: Re: RE: Re: RE: sudo vs. su/root  PostPosted: 26.08.2011, 22:40
Moderator


Joined: 2010-09-11
Posts: 228
Location: Vienna (AT)
Status: Offline
      seasons wrote:
Actually, I confirmed that I did indeed keep the old configuration, which is what's causing the issue. The sudoers file now includes this line:
      Code:
Defaults   secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

I still have
      Code:
Defaults        env_reset
in /etc/sudoers

hubi

_________________
Tilos Rádió Budapest
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
seasonsOffline
Post subject: Re: RE: Re: RE: sudo vs. su/root  PostPosted: 27.08.2011, 09:46



Joined: 2010-09-13
Posts: 92

Status: Offline
      hubi wrote:
I still have
      Code:
Defaults        env_reset
in /etc/sudoers
hubi

Ok, does this work for you?
      Code:
sudo ldconfig
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio