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: Building /etc/passwd from setup.exe


At 05:03 PM 12/8/2002 -0000, you wrote:
>> Also you probably are in the local Users group, but you
>> don't see it. 
>
>Possibly, how can I tell?

Type "id" while "Users" is in your /etc/groups.
It is put there by mkgroup -l

>So, what to do...
>
>1) go back to only adding local users
>2) keep things the way they are, somehow detecting whether
>   the user is running on a domain or not...
>3) only add the current user
>4) output local *and* domain (or current) if on a domain
>5) something else...
>
>Personally, I prefer 2, but given the above, I don't
>know how to detect whether I'm a member of a domain or not.

That's one of the reasons why I proposed adding -c.
If that isn't accepted, I would do 4) with Earnie's suggestion.
Something like
if [ ! -e /etc/passwd ] ; then
    mkpasswd -l > /etc/passwd
    if [ ! -z "$USERDOMAIN" ] && [ "$USERDOMAIN" != "`hostname`" ] ; then
        mkpasswd -d -u $USERNAME  >> /etc/passwd
By the way that can be implemented immediately in base-passwd for the 
benefit of those using the new setup.exe. You can also add programs to
uppercase all names.
Calling "mkpasswd -l -c" instead of the above would have to wait until
the next Cygwin release.

Pierre


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