AIX sudo rootsh

2

I'm allowed to do:

sudo /usr/bin/rootsh   -i -u user

Additionally I want do something like:

echo 'date' | sudo /usr/bin/rootsh   -i -u user

Here I get the answer:

no tty/pty on stdin: Not a typewriter

Any idea how to solve this?

Gerold

Posted 2016-12-23T10:08:26.533

Reputation: 21

Not sure if you are able to make that work. rootsh as I understand from the manuals are made function as a wrapper. Taken from the man-page "rootsh - a logging wrapper for shells"

This makes me think that it tries to take control over the terminal and not "stdin".

But feel free to correct me. – David Bern – 2016-12-23T10:35:19.313

What version of rootsh are you running? – David Bern – 2016-12-23T10:38:24.733

Where looking at the source-code at https://sourceforge.net/p/rootsh/code/ci/master/tree/src/rootsh.c

Version 1.5.4 should work, as far I can understand from the code at row 363.

Im not a user myself. But if possible, please provide version number

– David Bern – 2016-12-23T10:41:33.963

No answers