Sponsored Content
Full Discussion: MSYS2 on Windows 7 VM
Special Forums Windows & DOS: Issues & Discussions MSYS2 on Windows 7 VM Post 302947366 by mrm5102 on Wednesday 17th of June 2015 12:54:00 PM
Old 06-17-2015
Bump....


Update:
Not sure I did this correctly or if it's going to mess anything up later on down the road, but I made a slight workaround... Haven't actually changed the existing Username, which I want to do but after reading some stuff for Cygwin, which is what MSYS is built off of I believe, it said the User in Cygwin is directly linked to that of your Window's User. So any files/folders will also be owned by your Windows User, or something along those lines...

But anyway, since MSYS does not create a /etc/passwd file, I ran the command
Code:
/usr/bin/mkpasswd  >  /etc/passwd

which created the passwd file using all existing user information. Then I simply modified the HOME dir portion of my User's line in /etc/passwd to a 'first intial last name' format, like "/home/flastname".

Then I copied everything from the old HOME dir to the new one using these 2 commands. Needed both because the first cp did not copy hidden files...
Code:
# cp -R /home/First*/* /home/flastname/
# cp -R /home/First*/.* /home/flastname/

After I did all that and I opened a new MSYS terminal, I was automatically taken to the NEW home dir by default.

I would still love to be able to change the Username itself if at all possible, but still have not found any instructions on how to do so.

I did however read an interesting article on someone trying to do this with Cygwin and what they did was:
1st) They installed Cygwin completely.
2nd) After the installation and before opening Cygwin for the first time they said they opened "/etc/passwd" and found the line containing their default Window's User and changed the username to something without whitespace, like the first initial and lastname format.
3rd) They opened the Cygwin terminal for the first time and Ta-Da, the new username was used instead...

Does that sound like something I should try? Could something like that mess-up anything else? Maybe file permissions, or something along those lines...? I would just hate to have to re-download any packages I've installed or re-do any modifications I made to the system already

Or... Maybe there is a way to "trick" MSYS into thinking it's the first time I'm opening MSYS and I could try the above, any idea..?

Thanks,
Matt
 

3 More Discussions You Might Find Interesting

1. Programming

[MSYS2/GCC-TDM] Compiler not finding headers in /usr/local/include

I hope it's okay to post this here. I'm working on Windows computer but using the Unix-like environment MSYS2 (https://sourceforge.net/projects/msys2). My problem is that I can't get the compiler to find headers located in /usr/local/include. I am trying to compile libpng which wants the header... (1 Reply)
Discussion started by: AntumDeluge
1 Replies

2. Windows & DOS: Issues & Discussions

UNIX for Advanced & Expert Users > I tried to build libtiff on MSYS2+minGW but found an interruption

When I tried to build libtiff on MSYS2+minGW and opened the MSYS2 shell, got error: $ ./configure configure: loading site script /etc/config.site checking build system type... Invalid configuration `x86_64-pc-msys': system `msys' not recognized configure: error: /bin/sh config/config.sub... (1 Reply)
Discussion started by: abdulbadii
1 Replies

3. Windows & DOS: Issues & Discussions

Can I replace the gcc, and along with all other binaries, in MSYS2 minGW64 with the MinGW64 Project

Can I replace the gcc, and along with all other binaries too, in MSYS2 minGW64 with ones by MinGW64 Project Can i safely replace the gcc, if asked, telling its version: gcc.exe (Rev2, Built by MSYS2 project) 6.2.0 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see... (1 Reply)
Discussion started by: abdulbadii
1 Replies
vipw(8) 						      System Manager's Manual							   vipw(8)

NAME
vipw - Edits the /etc/passwd file SYNOPSIS
/usr/sbin/vipw DESCRIPTION
You use the vipw command to edit the /etc/passwd file with the editor defined in the EDITOR environment variable. If the variable is not set, the default editor is vi. The vipw command performs basic consistency checks on the edited file. If a hashed indexed passwd existed previously, the vipw command uses the mkpasswd command to create recreate it. The command must not be used on systems that use extended security attributes since it cannot set or change them. You must be root to run this command. Only root and security administrators should have execute access to this command. Since the vipw command cannot effectively change all the attributes of users, it should not be used in a secure environment. The vipw command accesses the following files, and requires the listed permissions: ------------------------------ Permissions File ------------------------------ rw /etc/passwd rw /etc/passwd.pag rw /etc/passwd.dir rw /etc/ptmp rw /etc/ptmp.pag rw /etc/ptmp.dir ------------------------------ EXAMPLE
To edit the /etc/passwd file, type the following command and add the required line entry: vipw FILES
Specifies the command path RELATED INFORMATION
Commands: passwd(1), passwd(4), adduser(8), mkpasswd(8) delim off vipw(8)
All times are GMT -4. The time now is 07:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy