On Apr 11 16:20, Duncan Roe wrote: > On Thu, Apr 10, 2014 at 09:47:26PM -0600, Warren Young wrote: > > On 4/10/2014 20:16, Duncan Roe wrote: > > >Yes, I'm one of those users. I need my login name to match the Linux > > >systems so > > >I can use rsh and not be challenged for a password when the cygwin host > > >name is > > >in ~/.rhosts > > > > If you switch to SSH, you can solve this by putting this into your > > ~/.ssh/config file: > > > > Host myremotehost > > User duncan_roe > > > > That is, you can override defaults (like login name) on a per-connection > > basis. Anything you can pass as an option to ssh(1) can be changed here, so > > you don't have to keep providing the option. > > > > With pre-shared keys, I don't think you'll see a difference in behavior > > relative to rsh. > > > I don't want to switch to ssh. rsh is in an expect script, so providing ssh > options every time would not be a problem. But I want to use rsh.
OTOH, if there *is* an official workaround which is, "use the /etc/passwd file to chnage your username", wouldn't that be sufficient? I understand your point, but the search problem in the Windows user DBs as I outlined persists. What I did a couple of weeks ago ws to change the mkpasswd tool so that it creates the exact same passwd entries as you get when fetching them directly from Windows. For instance, the passwd entry generated for my AD account inside of Cygwin will look like this: corinna:*:1049577:1049701:Corinna Vinschen,U-VINSCHEN\corinna,S-1-5-21-2913048732-1697188782-3448811101-1001:/home/corinna:/bin/tcsh Using the "new" mkpasswd, calling `mkpasswd -d -u corinna', I get the exact same entry! If I write this into /etc/passwd, I'm getting the exact same correct uid and gid values, but I can change my username: $ mkpasswd -d -u corinna > /etc/passwd $ sed -i -e 's/^corinna:/cathy:/' /etc/passwd [logout/login] $ id uid=1049577(cathy) gid=1049701(vinschen) groups=1049701(vinschen), 559(+Performance Log Users),545(+Users),[...] That should be sufficient, shouldn't it? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
pgpQKFQBArrwP.pgp
Description: PGP signature