X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <47A37865.5B338D63@dessent.net> Date: Fri, 01 Feb 2008 11:52:05 -0800 From: Brian Dessent <brian AT dessent DOT net> X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: root and chown References: <18k1iodi01ckf.1rrzef1z5dlt8$.dlg AT 40tude DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: <cygwin.cygwin.com> List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com> List-Archive: <http://sourceware.org/ml/cygwin/> List-Post: <mailto:cygwin AT cygwin DOT com> List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com "Robert W. Kuhn" wrote: > On my windows computer: > > root AT server:grep root /etc/passwd > root::0:0:root:/root:/bin/bash > operator:*:12:0:operator:/root: > > root AT server:chown root sshd/ > chown: changing ownership of `sshd': Invalid argument 'root' works differently in Windows than unix. It is a group (an alias to the Administrators group), not a user, because in the Windows security model ownership can be by either. And it has a special SID as it is a well-known group. Thus you shouldn't have any root entry in your passwd, and you should have a root entry in your /etc/group that has the SID of S-1-5-32-544. This is all automatically done for you when you run mkgroup and mkpasswd, so there should not be any need to touch this. > The original proble is that I want to start the ssd-server on the client > but: > > root AT client:/var/empty# /etc/init.d/ssh start > Starting OpenBSD Secure Shell server: sshd/var/empty/sshd must be owned > by root and not group or world-writable. > failed (255: ). Okay, stop there. To install sshd you simply run "ssh-host-config" and it will set everything up with the appropriate privileges and ownerships. Note that this installs ssh as a service, not through init.d. This is the preferred way to run daemons on Windows, because they automatically start at bootup with user intervention. Thus you should get used to starting and stopping the sshd daemon with cygrunsrv -S/-E, not through any script. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/