Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2013 11:12:56 +0000
From:      Chris Whitehouse <cwhiteh@onetel.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Sharing a mail folder between Linux and FreeBSD
Message-ID:  <50FE7438.4050700@onetel.com>
In-Reply-To: <20130122063230.c0d65521.freebsd@edvax.de>
References:  <1358811229.2031.60.camel@precise> <20130122073125.459ad795@X220.ovitrap.com> <1358816032.3045.53.camel@precise> <20130122081804.5569d38c@X220.ovitrap.com> <1358818271.3045.66.camel@precise> <20130122063230.c0d65521.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
>
>
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50FE7438.4050700>