This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Globally creating a user and a group "root"


On Wed, Nov 12, 2003 at 03:44:44PM +0100, Corinna Vinschen wrote:
> On Wed, Nov 12, 2003 at 12:29:08PM -0000, Morrison, John wrote:
> > Corinna Vinschen wrote:
> > > Eh, no.  I was thinking about a postinstall script, which checks for
> > > Everyone (S-1-0-0) in /etc/passwd and /etc/group and removes these
> > > entries silently.  The same script could add the "root" entry to
> > > /etc/group. 
> > 
> > But then what happens if somebody messes up there /etc/[passwd|group]
> > and have to create it again?  Does mk[passwd|group] do the changes
> > automatically?
> 
> mkpasswd and mkgroup don't create an Everyone entry since August 2002.
> 
> The remaining problem is the special handling of root.  I guess it's
> best to create the /etc/group entry already in mkgroup.  For mkpasswd
> it might be best, to add a special handling like this:  If a Windows
> user "root" exists, give it the uid 0.

I've created a "create-root" script to be put under /usr/sbin for review.
It's basically taken from the relevant part of the latest ssh-host-config.
It doesn't only create a user root in the SAM, it also modifies /etc/passwd
and /etc/group appropriately.  The script is attached.  Please give it a
shot.

Another question is this:

Should we actually depend on creating an NT account called "root"?
This might be already in use by a bunch of users and sysadmins just
for fun.  Probably we do more often collide with that than we like.

What about using a less common name like, say "cygwin_root" or
"cygsrv_root" or so.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

Attachment: create-root
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]