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
  • 12,665
  • 15
  • 42
  • 74
Shubham
  • 15
  • 4

0 Answers0