LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   ssh && su problem... (https://www.linuxquestions.org/questions/fedora-35/ssh-and-and-su-problem-351963/)

branque 08-10-2005 05:04 PM

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.

hob 08-10-2005 05:08 PM

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

branque 08-12-2005 04:19 PM

Thanks hob

It works when Im using /sbin/ifconfig but its more simple to use su - insteed.

hob 08-13-2005 05:32 AM

Using su - is recommended, unfortunately it's not obvious :)


All times are GMT -5. The time now is 10:38 AM.