Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux Script Sudo and "&"
#7
(Aug-28-2019, 10:15 AM)DeaD_EyE Wrote: Why do you run your program as root?
Can you start it as normal user?

Sudo runs your programs in a different environment. If you have an activated virtuelenv, then it would be not used with sudo.
If you need access to resources like ttyUSB0, you can add the dialup group (is in many distributions the case) and after a new login, the user has the right to access ttyURB0. If you want to open a port below 1024, it's not possible without root access.

hello i want to run a command with sudo
because from the nature it cant be run as normal user
in fact i have make a subprocess with Popen and PIPES
so this is the problem
i need sudo cause the internal command in subprocess needs sudo
thanks again
Reply


Messages In This Thread
Linux Script Sudo and "&" - by s3fac5 - Aug-28-2019, 07:13 AM
RE: Linux Script Sudo and "&" - by Axel_Erfurt - Aug-28-2019, 07:25 AM
RE: Linux Script Sudo and "&" - by s3fac5 - Aug-28-2019, 07:57 AM
RE: Linux Script Sudo and "&" - by metulburr - Aug-28-2019, 08:32 AM
RE: Linux Script Sudo and "&" - by s3fac5 - Aug-28-2019, 08:50 AM
RE: Linux Script Sudo and "&" - by DeaD_EyE - Aug-28-2019, 10:15 AM
RE: Linux Script Sudo and "&" - by s3fac5 - Aug-28-2019, 10:36 AM
RE: Linux Script Sudo and "&" - by Axel_Erfurt - Aug-28-2019, 04:18 PM
RE: Linux Script Sudo and "&" - by s3fac5 - Aug-28-2019, 06:21 PM
RE: Linux Script Sudo and "&" - by Axel_Erfurt - Aug-28-2019, 10:49 PM
RE: Linux Script Sudo and "&" - by s3fac5 - Aug-29-2019, 06:32 AM
RE: Linux Script Sudo and "&" - by DeaD_EyE - Aug-29-2019, 08:29 AM
RE: Linux Script Sudo and "&" - by s3fac5 - Aug-29-2019, 07:16 PM
RE: Linux Script Sudo and "&" - by DeaD_EyE - Aug-29-2019, 07:24 PM
RE: Linux Script Sudo and "&" - by s3fac5 - Aug-30-2019, 08:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] [Linux] Run Python script through cron? Winfried 2 1,392 Oct-19-2024, 06:29 PM
Last Post: Winfried
  Is possible to run the python command to call python script on linux? cuten222 6 2,631 Jan-30-2024, 09:05 PM
Last Post: DeaD_EyE
  [SOLVED] [Linux] Script in cron stops after first run in loop Winfried 2 1,727 Nov-16-2022, 07:58 PM
Last Post: Winfried
  How to compile a Python script for a Windows / Linux executable? netanelst 2 2,242 May-24-2022, 07:02 AM
Last Post: netanelst
  sudo apt Not Working Dacdiver 11 23,553 Nov-09-2021, 05:48 PM
Last Post: jefsummers
  sudo RyAn 2 2,330 Nov-09-2021, 12:43 PM
Last Post: DeaD_EyE
  cant use ping, sudo or other commands in remote shell script. throwaway34 7 5,388 May-17-2021, 11:29 AM
Last Post: throwaway34
  Error when running script on startup in Linux NoahTheNerd 0 2,659 Mar-07-2021, 04:54 PM
Last Post: NoahTheNerd
  Login to NordVPN on Linux with python script AGreenPig 2 7,780 Feb-09-2021, 10:44 AM
Last Post: AGreenPig
  script works in windows but not in linux ovidius80 2 3,844 Apr-29-2020, 02:10 PM
Last Post: ovidius80

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020