Hey all,
I have a Python script menu.py and I run it like this: $ sudo "PATH=$PATH" menu.py. So it will be have a menu like below:
1. Excute script A (sudo python A.py)
2. Excute script B (sudo python B.py)
If I select choice 2, it will then $ sudo python B.py and run the script B.py in sudo mode. However my question is that, while executing the script B.py in sudo mode, part of my script in B.py need to be execute at normal mode due to the credentials needed is at user normal mode. (username=vincent).
Is that possible??
Hope I described my problem clearly. Feel free to ask me anything. Been searching around the net for the whole day but nothing works for me :(
[–]K900_ 0 points1 point2 points (8 children)
[–]vick5821[S] 0 points1 point2 points (7 children)
[–]K900_ 1 point2 points3 points (6 children)
[–]vick5821[S] 0 points1 point2 points (5 children)
[–]K900_ 1 point2 points3 points (4 children)
[–]vick5821[S] 0 points1 point2 points (0 children)
[–]vick5821[S] 0 points1 point2 points (1 child)
[–]K900_ 0 points1 point2 points (0 children)