2016-09-30 20 views

回答

0

在爲su命令的手冊頁一看結果如下:

-, -l, --login 
      Start the shell as a login shell with an environment similar 
      to a real login: 

      o  clears all the environment variables except TERM 

      o  initializes the environment variables HOME, SHELL, 
        USER, LOGNAME, and PATH 

      o  changes to the target user's home directory 

      o  sets argv[0] of the shell to '-' in order to make 
        the shell a login shell 

所以,如果你使用sudo su -上述變量被刪除,並根據您的新用戶(root或其他信息填滿)。

也許一些需要的環境變量是爲root用戶設置的? 不幸的是,我還沒有與kerberos合作過。

希望我幫了你一下。