On Tue, Apr 25, 2006 at 03:04:26PM +0200, Abdelrazak Younes wrote: > Enrico Forestieri a écrit : > > On Tue, Apr 25, 2006 at 10:58:43AM +0200, Abdelrazak Younes wrote: > > > >> What is the equivalent of /etc/fstab on cygwin? This information is in > >> the registry? > > > > There is no /etc/fstab on cygwin and yes, the information is stored > > in the registry but you should use "mount" both to access and modify > > it. On cygwin, the mount points are the only thing which is stored in > > the registry. > > > > In a cygwin shell try: > > > > ls "/proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Cygnus > > Solutions/Cygwin/mounts v2" > Gives: > / /lyxsrc /lyxtrunk /usr/bin /usr/lib cygdrive flags cygdrive prefix > > > > > or > > > > ls "/proc/registry/HKEY_CURRENT_USER/Software/Cygnus > > Solutions/Cygwin/mounts v2" > > Gives nothing. I guess this is because Cygwin is installed for all users.
Yes > So if I provide a script like this: > > mount -f -s -b "D:/cygwin/bin" "/usr/bin" > mount -f -s -b "D:/cygwin/lib" "/usr/lib" > mount -f -s -b "D:/cygwin" "/" > mount -s -b --change-cygdrive-prefix "/cygdrive" > > and tell the user to execute it within the cygwin console the first time > he uses it, it should work? You have to tell them replacing "D:/cygwin" with the actual path where the cygwin folder has been placed. > What about the users? Will cygwin create automatically "/home/joe" for > user "joe"? Given that you are giving them a verbatim copy of your cygwin installation, they will also have /etc/passwd where the users are defined. However, it must be synced with the User Manager GUI. Users and home dirs can be created using "mkpasswd", and I suggest that you read its man page (man mkpasswd). You can redirect them to the cygwin FAQ, specifically questions 2.11 and 2.18 apply. Here is an excerpt: 2.11. My Windows logon name has a space in it, will this cause problems? Most definitely yes! UNIX shells (and thus Cygwin) use the space character as a word delimiter. Under certain circumstances, it is possible to get around this with various shell quoting mechanisms, but you are much better off if you can avoid the problem entirely. On Windows NT/2000/XP you have two choices: 1. You can rename the user in the Windows User Manager GUI and then run mkpasswd. 2. You can simply edit the /etc/passwd file and change the Cygwin user name (first field). It's also a good idea to avoid spaces in the home directory. On Windows 95/98/ME you can create a new user and run mkpasswd, or you can delete the offending entry from /etc/passwd. Cygwin will then use the name in the default entry with uid 500. ... 2.18. How do I save, restore, delete, or modify the Cygwin information stored in the registry? Currently Cygwin stores its mount table information in the registry. It is recommended that you use the mount and umount commands to manipulate the mount information instead of directly modifying the registry. To save the mount information to a file for later restoration, use mount -m > mounts.bat To remove all mount information use umount -A. To reincorporate saved mount information just run the batch file. For more information on using mount, see http://cygwin.com/cygwin-ug-net/using-utils.html#mount. -- Enrico