Safely change home directory

前端 未结 12 2333
南旧
南旧 2020-12-12 10:22

I\'m trying to safely update the home directory as specified in /etc/passwd, but the standard Linux utils - usermod and vipw - for doing so aren\'t provided by

12条回答
  •  遥遥无期
    2020-12-12 11:10

    To avoid problems caused by having spaces in the path to your home directory, use the short-form of the Windows 'Profiles' directory - i.e. /cygdrive/c/DOCUME~1/user.

    You can do this by typing the command:

    mkpasswd -l -p "$(cygpath $(cygpath -dH))" > /etc/passwd
    

提交回复
热议问题