BackupPC-users

Re: [BackupPC-users] Wrong user: my userid is 502, instead of (backuppc4afs), Please su backuppc4afs first

2009-07-22 11:39:29
Subject: Re: [BackupPC-users] Wrong user: my userid is 502, instead of (backuppc4afs), Please su backuppc4afs first
From: Wenping Yang <yangw3 AT umdnj DOT edu>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 22 Jul 2009 11:35:49 -0400
I used command id to determine userid. Actually "id backuppc4afs", "id
502" and "su backuppc4afs -c id" gave the same results:

RArwjms04:bin root# id backuppc4afs
uid=502(backuppc4afs) gid=1025(backuppc4afs) groups=1025(backuppc4afs)
RArwjms04:bin root# id 502
uid=502(backuppc4afs) gid=1025(backuppc4afs) groups=1025(backuppc4afs)
RArwjms04:bin root# su backuppc4afs -c id
uid=502(backuppc4afs) gid=1025(backuppc4afs) groups=1025(backuppc4afs)

My Mac machine is not using LDAP or AD, it is a standalone machine.
Account "backuppc4afs" is a local account.

When I read the source code, I found that script BackupPC is using
getpwnam() to check uid. And it seems that output of getpwnam() from
Linux and Mac are different:

Linux:
usernamex56780Fname Lname/afs/rwjresearch.umdnj.edu/home/username/bin/bash
(account name: username, uid: 5678)

Mac:
backuppc4afs********50210250backuppc4afs/Users/backuppc4afs/bin/bash0
(account name: backuppc4afs, uid:502)

I think those "********" might have caused the problem.

Wenping



Stephen Joyce wrote:
> How did you determine that userid 502 is backuppc4afs? Do "id backuppc4afs" 
> and "id 502" return the same results? What about "su backuppc4afs -c id"?
>
> Have you configured the Mac to be aware of either an ldap server or AD 
> domain in Directory Services? It's easy to accidentally configure duplicate 
> uids or uidnumbers if so. [Remember each Mac has its own directory service 
> and only uses bsd flatfiles in single-user mode, so don't be distracted 
> by them.]
>
> If you find you do have a duplicate, file ownership may be an issue after 
> correcting it.
>
> Cheers, Stephen (who has discovered there are generally more reasons to 
> dislike Macs than to like them)
> --
> Don't let the perfect be the enemy of the good.
>
> On Wed, 22 Jul 2009, Wenping Yang wrote:
>
>   
>> Hello,
>>
>> After installed Backuppc4afs on Mac 10.5 server, I could start backup
>> from CGI interface, but it could not automatically start scheduled
>> backup.  The error in LOG is:
>>
>> /usr/local/BackupPC/bin/BackupPC_nightly: Wrong user: my userid is 502,
>> instead of  (backuppc4afs)
>> Please su backuppc4afs first
>>
>> The problem is that userid 502 is backuppc4afs, I don't understand why
>> it thinks they are different.
>> Anyone had this problem before?
>>
>> Thank you.
>>
>> Wenping
>>
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> BackupPC-users mailing list
>> BackupPC-users AT lists.sourceforge DOT net
>> List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
>> Wiki:    http://backuppc.wiki.sourceforge.net
>> Project: http://backuppc.sourceforge.net/
>>
>>     
>
> ------------------------------------------------------------------------------
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users AT lists.sourceforge DOT net
> List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:    http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
>   

------------------------------------------------------------------------------
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/