On 2. 1. 2016 8:10, Andrew Lowe wrote:
> Hi all,
>       I'm setting up a portable programming environment for Engineering 
> students. It is to be installed on a usb stick, have gcc, clang etc and 
> I'll drop Notepad++ in there as well as the editor. The reasoning behind 
> this is that that the students can plug in the stick to any Win machine 
> and they will have their development environment, and more importantly 
> their source.
> 
>       This is where my problem lays. I need to set up a generic user, say the 
> class number, epro1000, that in turn when the "boot" batch file, 
> mingw64_shell.bat, is run, it will drop the student into this home dir, 
> /home/epro1000, nowhere else.
> 
>       In the reading/googling I've done, user info appears to be gotten from 
> Windows and then this forms the basis of the home dir path, 
> /home/UserNameGottenFromWin. This means that a student logging in at Uni 
> will have a home dir named after their student id, /home/12345678, which 
> is their Win network login, and then another dir, /home/pornlord, 
> because at home they will have a standalone machine with a different login.
> 
>       So in summary, how do I config this so that irrespective of the 
> credentials used to log into the underlying machine, running the batch 
> file will drop me in /home/epro1000 with my paths all nicely set up for 
> dev work?

Try putting `db_home: /home/epro1000` in `/etc/nsswitch.conf`. Read more at 
<https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch>. Don't 
forget that MSYS2 doesn't work well on FAT filesystems (e.g. [1]), so you'll 
probably need to list NTFS as a required FS for the USB stick.

[1] http://sourceforge.net/p/msys2/tickets/79/

-- 
David Macek

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to