Click to See Complete Forum and Search --> : su doesnt do the job


thatzinz
10-26-2004, 06:36 PM
when i do "su" and type in the the password, i usually excpet that when i do that, programs thats should only run as root will run, but like when i type "su" then "ifconfig" , ifconfig wont run. im running fedora 2

EnigmaOne
10-26-2004, 07:00 PM
You probably don't have your path set to access those files.

try:
"su"
enter your password
"/sbin/ifconfig"

serz
10-26-2004, 09:00 PM
Originally posted by EnigmaOne
You probably don't have your path set to access
No, I think he's just using the wrong command. Use "su -" instead of just "su".

DESCRIPTION
su is used to become another user during a login session. Invoked
without a username, su defaults to becoming the super user. The
optional argument - may be used to provide an environment similiar
to what the user would expect had the user logged in directly.

If you don't use the -, the users's PATH (in this case, root) won't get loaded.

happybunny
10-26-2004, 09:17 PM
if it matters, i agree with the need for the -

the - actually puts you into that users environment...path and all.