The -i (simulate initial login) option runs the shell specified in the passwd(5) entry of
the target user as a login shell. This means that login-specific resource files such as
.profile or .login will be read by the shell. If a command is specified, it is passed to
the shell for execution. Otherwise, an interactive shell is executed. sudo attempts to
change to that user's home directory before running the shell. It also initializes the
environment, leaving DISPLAY and TERM unchanged, setting HOME, SHELL, USER, LOGNAME, and
PATH, as well as the contents of /etc/environment on Linux and AIX systems. All other
environment variables are removed.
On 03/18/2011 04:06 AM, yasar11732 wrote:
> My sudo command doesn’t see all of my path. Is this a normal behaviour.
> If not how do I fix this?
security is the reason [sudo here is different from sudo in (say)
Ubuntu or others]…try
su -c ‘service ***** start’
which is 3 strokes longer…
some ‘repair’ the sudo path, i’d rather have the extra strokes…
hmmmmmm, i’ve not thought about how to alias it…
just now i has s =‘su -’
i guess maybe sc could be ‘su -c’ and then
sc ‘service ***** start’
would be the same strokes as your sudo string…
lots of cats to skin.
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11