i installed cygwin on usb stick. i'm going use cygwin on 2 computers. (my laptop , desktop computer.)
unfortunately, 2 computer have different user name. (user , ryang). every time switch 2 computers, location of user's home directory chages.
if use cygwin ryang
, home directory /home/ryang
. if use cygwin user
, home directory in /home/user
. want use 1 user, "sohnryang".
i don't want change 2 computer's settings. solution this?
the problem not 2 users different cygwin, different windows point of view.
to rename cygwin user can use file /etc/passwd
mkpasswd -c > /etc/passwd sed -e "s/ryang:/sohnryang:/g" -i /etc/passwd
and can repeat in second computer
mkpasswd -c >> /etc/passwd sed -e "s/user:/sohnryang:/g" -i /etc/passwd
so both share same cygwin name. :
needed change first , sixth fields; leaving untouched fifth.
however 2 users different windows can verify with
c:\users\myself>whoami /user user information ---------------- user name sid ==================== ============================================= my_computer\myself s-1-5-21-531030479-1339336681-3415091201-1009
the 2 sid's different in 2 computer if user names same in windows. windows user name , sid merged in 5th field of /etc/passwd
the sid difference cause authorization issue between files created on 2 computer, depending on type of system. windows home versions more puzzling professional ones.
Comments
Post a Comment