[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sbin



On Mon, Jan 2, 2012 at 1:52 AM, lina <lina.lastname@gmail.com> wrote:
> On Monday 02,January,2012 12:50 AM, Joao Ferreira Gmail wrote:
>>
>> On Mon, 2012-01-02 at 00:42 +0800, lina wrote:
>>>
>>> Hi,
>>>
>>> Is it safe to add /sbin into PATH?
>>
>> there should be no problem, but a regular (non-root) user will not be
>> able to do much with it because most of those executables will at some
>> point require root privilege (at least that is my guess)
>>
>>> Why the default path not include /sbin,
>>
>> On my system (Debian wheezy) I have it on root's PATH but not on regular
>> user's PATH:
>>
>> root@wheejy:~# echo $PATH
>> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
>>
>> jmf@wheejy:~$ echo $PATH
>> /home/jmf/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
>>
>>
>> tipically those commands are not used (not supposed to be used) by
>> regular users.
>>
>> But I guess it won't hurt to add it to the PATH
>
> Thanks, I just checked, it's included in root PATH, not in user path.
> They really think so much to build a system.

There those who encourage using full path for anything you call as
user. I lean that way myself, but I'm a bit lazy at times.

(Even if you put /sbin first in the search order, there's still the
kind of problem where, say, you may be expecting to use /sbin/lvm on a
machine where lvm is not installed, but some user has managed to put a
rogue binary called lvm in /usr/bin.)

>> Joao
>>
>>
>>> Thanks with best regards,

(Sorry about that last extra from me because of the CC, Tom.)

--
Joel Rees


Reply to: