handle root or normal user