Re: Differentiate workgroup system from domain member under Cygwin

2010-01-22 Thread Corinna Vinschen
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

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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



Re: Differentiate workgroup system from domain member under Cygwin

2010-01-22 Thread Christoph Herdeg




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



Re: Differentiate workgroup system from domain member under Cygwin

2010-01-22 Thread Corinna Vinschen
On Jan 22 10:34, Christoph Herdeg wrote:
 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?

There are certainly multiple methods to fetch this information.  One of
them is, for instance:

  bash$ net config workstation | grep -q 'Domain DNS' \
 echo domain-member || echo standalone-machine


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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



Re: Differentiate workgroup system from domain member under Cygwin

2010-01-22 Thread Christoph Herdeg


On Jan 22 10:34, Christoph Herdeg wrote:
 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?

There are certainly multiple methods to fetch this information.  One of
them is, for instance:

  bash$ net config workstation | grep -q 'Domain DNS' \
 echo domain-member || echo standalone-machine


Corinna

Great! Works just perfect. Thank you very much!!!

--
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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





--
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



Re: Differentiate workgroup system from domain member under Cygwin

2010-01-22 Thread Sylvain RICHARD

Corinna Vinschen wrote:

On Jan 22 10:34, Christoph Herdeg wrote:
  

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?



There are certainly multiple methods to fetch this information.  One of
them is, for instance:

  bash$ net config workstation | grep -q 'Domain DNS' \
 echo domain-member || echo standalone-machine


Corinna
  
Of course you should be aware that localization kicks in. On a French 
Win Server 2k3 machine I get

Nom DNS du domaine de la station de travail

Good luck,

--
Sylvain RICHARD


--
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



RE: Differentiate workgroup system from domain member under Cygwin

2010-01-22 Thread Cooper, Karl (US SSA)
 Corinna Vinschen wrote:
 On Jan 22 10:34, Christoph Herdeg wrote:
 
 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? 
 
 
 There are certainly multiple methods to fetch this information.  One
 of them is, for instance: 
 
   bash$ net config workstation | grep -q 'Domain DNS' \
   echo domain-member || echo standalone-machine
 
 
 Corinna
 
 Of course you should be aware that localization kicks in. On a French
 Win Server 2k3 machine I get Nom DNS du domaine de la station de
 travail  
And for me, it is necessary to use Workstation (capital W) rather than 
workstation.

--
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