ssh && su problem...
ssh && su problem...
This is a n00b question ... I have installed Fedore Core 3 on an machine connected to a private network, updated all software, installed apache+mysql, started ssh service, started firewall/selinux with default settings. Then I use Putty software on a remove windows machine on network to logon as restricted user, type su to get superuser rights and then tries to use ifconfig but get no access, command not found. I also tries to restart apache webserver, apachectl, but same thing, command not found. I have as logged on as root, changed my user account to be included in the same user groups as root user, but no affect. I dont know what I have missed... My problem is this machine will be located outside UK connected to internet so I need ssh access with su root rights. I dont want to use PermitRootLogin option in ssd. Suggestions ? // Patrick, Nottingham, UK. |
You have to use su - (su + dash) to get the environment variables of the root user, rather than keeping the variables of the account that you logged in with.
Root's path variable has /sbin in it, but other users don't. So this works for root or with su -: ifconfig eth0 With just su or as a normal user you need to do this: /sbin/ifconfig eth0 |
Thanks hob
It works when Im using /sbin/ifconfig but its more simple to use su - insteed. |
Using su - is recommended, unfortunately it's not obvious :)
|
All times are GMT -5. The time now is 10:38 AM. |