Thread: kcheckers
View Single Post
Old 09-30-2013, 07:19 PM   #6
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
launch it from a command line in an ssh shell
Translates to:
'runs fine if run from a login shell' (ssh did a login when you connected.)

KUAL only provides another command line shell instance, running under the same user name that it is running under (root).
It **DOES NOT** provide a new login as user name root.
You get to code that yourself in your script.

Points to keep in mind:
*) You can always 'switch user' to the user name you already have.
*) The default user name for the 'switch user' command is 'root'.

so the command (while running as 'root' - which you are) would be:
su -l

Check if it works from a command line.
If it does, it will also work in a script to get a new 'login' shell instance.

Don't forget to 'exit' from this new shell when done, if your application does not do so for you.
knc1 is offline   Reply With Quote