Sharing a mail folder between Linux and FreeBSD

Chris Whitehouse cwhiteh at onetel.com
Tue Jan 22 11:14:22 UTC 2013


On 22/01/2013 05:32, Polytropon wrote:
> On Tue, 22 Jan 2013 02:31:11 +0100, Ralf Mardorf wrote:
>> On Tue, 2013-01-22 at 08:18 +0700, Erich Dollansky wrote:
>>>> I guess it would be possible to change the id for the existing FreeBSD
>>>> user and then to chown /home/user_name to fit to 1000?
>>>
>>> Of course, this would work. But then all existing files of the existing
>>> FreeBSD would be without owner.
>>
>> The current user is: rocketmouse
>> The uid is         : 1001
>>
>> Isn't it possible to change the uid to 1000?
>> This would cause that the owner wouldn't be rocketmouse anymore, but
>> still 1001. I then could run chown -R for /home/rocketmouse to switch
>> from 1001 to back to rocketmouse = new uid 1000.
>
> You would need to do two changes: First in the password database,
> with chsh (tidy way) or by editing the /etc/passwd, /etc/master.passwd
> and /etc/group files plus rebuilding the database with pwd_mkdb
> (untidy way) to assign rocketmouse = 1000 on FreeBSD.

Could you do this with pw(8)?
# pw usermod rocketmouse -u 1000
checking first there isn't a uid 1000 already.

Then chown -R

Chris

>
> Then you would also have to "promote" this change to the file
> system, as all the files still belong to a user with UID 1001.
> Use chown -R with the new numerical value of 1000.
>
> Result: Your user would have the UID 1000 on all systems, so
> all the "low level functions" would behave similarly.
>
>
>
>> Or another idea would be to create a new user with the uid 1000 and then
>> to add rocketmouse to the group of this user. I guess this is what you
>> already recommended.
>
> Yes, that would also work. You only have to make sure that
> group permissions are valid, and the "access permission" is
> provided in /etc/group properly.
>
>
>



More information about the freebsd-questions mailing list