Problem running ifconfig as non root
I'm trying to run ifconfig as a non root user, with the following command:
su - root ifconfig It prompts me for root password, I enter it correctly, then get the following error: "/sbin/ifconfig: /sbin/ifconfig: cannot execute binary file" Anyone have a clue? I know I can just login as root, but I'd really like to be able to execute root commands as non root every now and again. |
Code:
su -c "ifconfig" |
Nope, that produces same problem.
[wrybread@localhost ~]$ su -c "ifconfig" Password: bash: ifconfig: command not found |
My bad,
Code:
su -c "/sbin/ifconfig" |
Quote:
Code:
su - Quote:
|
If you are going to be using this cmd a lot, look into using the sudo facility.
|
Quote:
Code:
su -c "/sbin/ifconfig" Code:
su -c "ifconfig" - |
Quote:
|
Sorry, I guess since your posts were close together, and almost identical, I must have glazed over the second one.
|
Quote:
|
All times are GMT -5. The time now is 02:08 PM. |