1

I tried using os.environ.get("USER") function as I had this data for all the users I want to allow.

var = os.environ.get("USER")

if var in data:
    pass

But a user can change this env variable

export USER=allowed_name

Is there any other way to check the user's validity?

Tonechas
  • 13,398
  • 16
  • 46
  • 80
Shubham
  • 35
  • 4

0 Answers0