ONOS-7784: get login user who invoked sudo
Change-Id: I6270c3e29ac9a352d889b635023fc3d329d2c9c3
diff --git a/tools/test/topos/opticalUtils.py b/tools/test/topos/opticalUtils.py
index e8db648..ca01395 100644
--- a/tools/test/topos/opticalUtils.py
+++ b/tools/test/topos/opticalUtils.py
@@ -256,7 +256,7 @@
# from latest pipe files. For now we are removing all the pipes before
# starting LINC.
### User Name ###
- user = os.getlogin()
+ user = os.getenv('SUDO_USER')
### pipes ###
readPipe = "/tmp/home/{}/linc-oe/rel/linc/erlang.pipe.1.r".format(user)
writePipe = "/tmp/home/{}/linc-oe/rel/linc/erlang.pipe.1.w".format(user)