X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
In-Reply-To: <20100122092056.GJ2402@calimero.vinschen.de>
References: <889F761889B73C489CED80057EEE29DF032B5AD3@spsmail.prosozial.lokal>  <20100120154611.GA23663@ednor.casa.cgf.cx>  <OF89C27922.50D14C8F-ONC12576B3.002E8460-412576B3.002ED404@de.ibm.com> <20100122092056.GJ2402@calimero.vinschen.de>
Subject: Re: Differentiate workgroup system from domain member under Cygwin
X-KeepSent: 64A532B4:0C15EAAB-C12576B3:0033C47A;  type=4; name=$KeepSent
To: cygwin@cygwin.com
Message-ID: <OF64A532B4.0C15EAAB-ONC12576B3.0033C47A-412576B3.0034A40C@de.ibm.com>
From: Christoph Herdeg <christoph.herdeg@de.ibm.com>
Date: Fri, 22 Jan 2010 10:34:58 +0100
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com





>>On Jan 22 09:31, Christoph Herdeg wrote:
>> Dear Colleagues,
>>
>> I need being able to differentiate a workgroup system from a domain
member
>> in a shellscript under Cygwin - does anybody have an approach for me?

>Look for the mkpasswd uppercase options -C, -L, -D, -S.  They allow
>to generate usernames with machine/domain prefix.  Same for mkgroup.

>Corinna

Hi Corinna,

thanks for the fast reply. But I probably didn't express myself clearly
enough. In need to distinguish a workgroup/single system from a domain
member to know if I have to create a local user (net user bla /add) or not.
This needs to happen before calling mkpasswd/~group and without knowledge
of the current workgroup-/domain-name. Background is that I would like to
start sshd with a domain user, but only if the current machine is member of
a domain. Depending on that difference I need to use mkpasswd/~group with
other parameters (-l vs. -d).

So question is more if there is any place on a windows system, a file or a
directory or an entry in a file that exists only if that machine is a
domain member?

Best Regards,

Christoph Herdeg
Windows Infrastructure Support
Information Management
Development
IBM Software Group



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

