I Am Unable To Find The Etc/passwd File In Cygwin
I recently installed cygwin, and have been unable to find my passwd/etc file in order set to HOME. Is there any way to force cygwin to generate the file?
Answer
The /etc/passwd
and group
files are no longer generated by default, starting with Cygwin 1.7.34.
You can still generate them. Cygwin will use these files preferentially if present, by default, but only to cater to existing installs and special situations.
When these files are not present, Cygwin now uses the native Windows user management mechanisms: Active Directory where present, or SAM where not.
It is therefore recommended that you use this new mechanism to change your home directory. The easiest way I know of to do this is to add a line like this to your /etc/nsswitch.conf
file:
db_home: /%H
That will change your Cygwin home directory to be equal to your Windows user profile directory. There are many other legal %
tokens you can use here to achieve different results. See the previous link for details.
Related Questions
- → How to SFTP with PHP
- → git clone: fatal: The remote end hung up unexpectedly
- → Local Git repository does not exist after successful clone from cygwin bash
- → Why does Vista complain about a dead process when I use Cygwin X11 ssh and how do I get it to shut up?
- → Node.JS Error: Cannot find module 'posix' (using Cygwin)
- → Node.js cannot find module - interfering with cygwin on Windows
- → Does the tee command always wait for EOF?
- → C program compiled with cygwin in Windows works, segmentation fault under Linux. Is cygwin GCC 'bad'?
- → How do I change the colors displayed in cygwin rxvt?
- → Using `pkg-config` as command line argument under cygwin/msys bash
- → how to specify the C standard type if my compiler is Cygwin?
- → How can you recursively copy all of the *.foo files in src to target using cp and/or find?
- → Print a global variable using thread