Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Switch user terminal error

$
0
0
Hello All,

Here I am trying to login a Linux machine as admin user from a Solaris box..

& then switch to root user..

Code I use:

Code:

ssh admin@<IP> << END
su - root  << A
echo "Hello I am logged in as root"
exit
A
exit
END

But the error I get..
Code:

su: must be run from a terminal
:eek:

Can you please help? :confused:

BR
Nil

---------- Post updated at 05:48 PM ---------- Previous update was at 05:47 PM ----------

Sudo does not help.. Because the commands I am going to use does not allow using sudo..

Viewing all articles
Browse latest Browse all 16232

Trending Articles