Re: Sharing a mail folder between Linux and FreeBSD

2013-01-28 Thread Polytropon
On Mon, 28 Jan 2013 15:58:05 +0100, Ralf Mardorf wrote:
> On Mon, 28 Jan 2013 15:37:25 +0100, Polytropon  wrote:
> > It's rather untypical to check out _only_ kernel sources without
> > the "top level" content.
> 
> For the update from 8.x to 9.1 I even didn't check out the kernel source,  
> this is something I did much later ;). I simply followed the FreeBSD  
> instructions. Perhaps it were binaries, but anyway, IIRC a kernel was  
> compiled?!?

That would require kernel sources (and some of the "top level"
files). Probably only a binary kernel update has been performed
because that's the purpose of freebsd-update (versus installing
from source).


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-28 Thread Ralf Mardorf

On Mon, 28 Jan 2013 15:37:25 +0100, Polytropon  wrote:

It's rather untypical to check out _only_ kernel sources without
the "top level" content.


For the update from 8.x to 9.1 I even didn't check out the kernel source,  
this is something I did much later ;). I simply followed the FreeBSD  
instructions. Perhaps it were binaries, but anyway, IIRC a kernel was  
compiled?!?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-28 Thread Polytropon
On Mon, 28 Jan 2013 10:51:21 +0700, Erich Dollansky wrote:
> Hi,
> 
> On Mon, 28 Jan 2013 01:36:36 +0100
> Ralf Mardorf  wrote:
> 
> > On Sun, 2013-01-27 at 13:58 +0100, Polytropon wrote:
> > > #  1.  `cd /usr/src'   (or to the directory containing your
> > > source tree). #  2.  `make buildworld'
> > > #  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is
> > > GENERIC). #  4.  `make installkernel
> > > KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC). #   [steps
> > > 3. & 4. can be combined by using the "kernel" target] #  5.
> > > `reboot'(in single user mode: boot -s from the loader
> > > prompt). #  6.  `mergemaster -p' #  7.  `make installworld'
> > > #  8.  `make delete-old'
> > > #  9.  `mergemaster'(you may wish to use -i, along with
> > > -U or -F). # 10.  `reboot'
> > > # 11.  `make delete-old-libs' (in case no 3rd party program uses
> > > them anymore)
> > 
> > 
> > What source tree? I only checked out the kernel source using svn and
> 
> yeah, what source tree? It seems that you do not have one.

It's rather untypical to check out _only_ kernel sources without
the "top level" content. The tree will probably be complete, but
if it hasn't been used yet to create world (and kernel), the
/usr/obj "cache" will be empty, so no "quick" re-installation
for modified binaries (modified in permissions, not in context).



> > # freebsd-update -r 9.1-RELEASE upgrade
> 
> This is very much a binary upgrade. You might have a source tree for
> 8.3 which is not very helpful now.

Except freebsd-update also updates the src/ subtree, usually if
the default "Components src world kernel" is kept. So it will
probably be the corresponding RELEASE tree.



> I do not know if this program is able to fix your problem.

Probably not, except by a "binary update to the same version"
which can be considered a re-install.



> > I wanted to run it tonight, but since I don't know where my source
> > tree is, I can't continue.
> 
> I think that you simply do not have one. At least not a current one.
> Read the handbook how you can get the source tree and then download and
> compile it.
> 
> I believe that all other options will end in a re-installation.

If this is also to be considered for installed ports, that will
probably be the easiest solution. On the other hand, if the
amount of work is justified, tracking down the individual
defective permissions and manually fixing them could be an
option not to go that way, as it will definitely take some
time.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-28 Thread Ralf Mardorf
On Sun, 2013-01-27 at 23:57 -0500, kpn...@pobox.com wrote:
> On Mon, Jan 28, 2013 at 03:24:06AM +0100, Ralf Mardorf wrote:
> > On Fri, 2013-01-25 at 19:24 -0500, kpn...@pobox.com wrote:
> > > You can use mtree against the spec files in /etc/mtree/ to check for and
> > > fix incorrect permissions and owners on base system files. It won't help
> > > with /usr/local, but at least you can get the base straight.
> > > 
> > > As root, from the root directory, something like this:
> > > mtree -U -f /etc/mtree/BSD.root.dist
> > > 
> > > There are other spec files in that directory. Poke around. 
> > 
> > So mtree can't fix /usr/local and poking around without knowledge is
> > asking for trouble :(.
> > 
> > /etc/mtree/BSD.root.dist is for the whole base?
> 
> Darn. I just looked and it looks like the stock mtree files just give the
> permissions of _directories_. They don't give the permissions (and owners)
> of files.
> 
> Well, one thing you can do is unpack the OS distribution somewhere else
> and then use mtree to create a manifest from that. That will also give
> you a single manifest instead of the multiple ones from "/etc/mtree".
> That's more work than I was hoping but still less than a full reinstall.

I've to search the emails, but IIRC there was an option to get the owner
from a dump backup.

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-28 Thread Ralf Mardorf
On Mon, 2013-01-28 at 10:51 +0700, Erich Dollansky wrote:
> Hi,
> 
> On Mon, 28 Jan 2013 01:36:36 +0100
> Ralf Mardorf  wrote:
> 
> > On Sun, 2013-01-27 at 13:58 +0100, Polytropon wrote:
> > > #  1.  `cd /usr/src'   (or to the directory containing your
> > > source tree). #  2.  `make buildworld'
> > > #  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is
> > > GENERIC). #  4.  `make installkernel
> > > KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC). #   [steps
> > > 3. & 4. can be combined by using the "kernel" target] #  5.
> > > `reboot'(in single user mode: boot -s from the loader
> > > prompt). #  6.  `mergemaster -p' #  7.  `make installworld'
> > > #  8.  `make delete-old'
> > > #  9.  `mergemaster'(you may wish to use -i, along with
> > > -U or -F). # 10.  `reboot'
> > > # 11.  `make delete-old-libs' (in case no 3rd party program uses
> > > them anymore)
> > 
> > 
> > What source tree? I only checked out the kernel source using svn and
> 
> yeah, what source tree? It seems that you do not have one.
> 
> > # freebsd-update -r 9.1-RELEASE upgrade
> 
> This is very much a binary upgrade. You might have a source tree for
> 8.3 which is not very helpful now.
> 
> I do not know if this program is able to fix your problem.
> 
> > I wanted to run it tonight, but since I don't know where my source
> > tree is, I can't continue.
> 
> I think that you simply do not have one. At least not a current one.
> Read the handbook how you can get the source tree and then download and
> compile it.
> 
> I believe that all other options will end in a re-installation.

IIUC I can use mtree to fix the owner for world, I only need to find the
smartest solution to fix the owner for software from the ports.

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Erich Dollansky
Hi,

On Mon, 28 Jan 2013 01:36:36 +0100
Ralf Mardorf  wrote:

> On Sun, 2013-01-27 at 13:58 +0100, Polytropon wrote:
> > #  1.  `cd /usr/src'   (or to the directory containing your
> > source tree). #  2.  `make buildworld'
> > #  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is
> > GENERIC). #  4.  `make installkernel
> > KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC). #   [steps
> > 3. & 4. can be combined by using the "kernel" target] #  5.
> > `reboot'(in single user mode: boot -s from the loader
> > prompt). #  6.  `mergemaster -p' #  7.  `make installworld'
> > #  8.  `make delete-old'
> > #  9.  `mergemaster'(you may wish to use -i, along with
> > -U or -F). # 10.  `reboot'
> > # 11.  `make delete-old-libs' (in case no 3rd party program uses
> > them anymore)
> 
> 
> What source tree? I only checked out the kernel source using svn and

yeah, what source tree? It seems that you do not have one.

> # freebsd-update -r 9.1-RELEASE upgrade

This is very much a binary upgrade. You might have a source tree for
8.3 which is not very helpful now.

I do not know if this program is able to fix your problem.

> I wanted to run it tonight, but since I don't know where my source
> tree is, I can't continue.

I think that you simply do not have one. At least not a current one.
Read the handbook how you can get the source tree and then download and
compile it.

I believe that all other options will end in a re-installation.

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Ralf Mardorf
On Fri, 2013-01-25 at 19:24 -0500, kpn...@pobox.com wrote:
> You can use mtree against the spec files in /etc/mtree/ to check for and
> fix incorrect permissions and owners on base system files. It won't help
> with /usr/local, but at least you can get the base straight.
> 
> As root, from the root directory, something like this:
> mtree -U -f /etc/mtree/BSD.root.dist
> 
> There are other spec files in that directory. Poke around. 

So mtree can't fix /usr/local and poking around without knowledge is
asking for trouble :(.

/etc/mtree/BSD.root.dist is for the whole base?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Ralf Mardorf
On Mon, 2013-01-28 at 01:46 +0100, Polytropon wrote:
> On Mon, 28 Jan 2013 01:36:36 +0100, Ralf Mardorf wrote:
> > On Sun, 2013-01-27 at 13:58 +0100, Polytropon wrote:
> > > #  1.  `cd /usr/src'   (or to the directory containing your source 
> > > tree).
> > > #  2.  `make buildworld'
> > > #  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is 
> > > GENERIC).
> > > #  4.  `make installkernel KERNCONF=YOUR_KERNEL_HERE'   (default is 
> > > GENERIC).
> > > #   [steps 3. & 4. can be combined by using the "kernel" target]
> > > #  5.  `reboot'(in single user mode: boot -s from the loader 
> > > prompt).
> > > #  6.  `mergemaster -p'
> > > #  7.  `make installworld'
> > > #  8.  `make delete-old'
> > > #  9.  `mergemaster'(you may wish to use -i, along with -U or 
> > > -F).
> > > # 10.  `reboot'
> > > # 11.  `make delete-old-libs' (in case no 3rd party program uses them 
> > > anymore)
> > 
> > 
> > What source tree? I only checked out the kernel source using svn and
> > IIRC it's using the /usr/src directory (I'm booted into Linux at the
> > moment), without a subdirectory /kernel. I can delete the kernel source,
> > since it's IMO fishy to have headers of another revision, than the
> > kernel is, but when I asked, I got a reply, that it should be ok for
> > FreeBSD. However, I never used the kernel source.
> 
> The content of /usr/src does not only contain the kernel. It's
> the whole OS, except of course you have only installed selected
> parts of this tree. The file I've mentioned is at the top of
> this structure: /usr/src/Makefile contains a short instruction
> of how to install kernel and world (and explains other possible
> targets).

Before I checked out the kernel source it was empty.

> > When I updated I did it like that (without subversion or cvs):
> > 
> > # cd /usr/ports/misc/mc && make install clean
> > # uname -r
> > 8.3-RELEASE
> > # freebsd-update -r 9.1-RELEASE upgrade
> > # freebsd-update install
> > # shutdown -r now
> > 
> > # freebsd-update install
> > # cd /usr/ports/ports-mgmt/portupgrade && make install clean
> > # /usr/local/sbin/portupgrade -f ruby
> > # rm /var/db/pkg/pkgdb.db
> > # /usr/local/sbin/portupgrade -f ruby18-bdb
> > # rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db
> > # /usr/local/sbin/portupgrade -af
> > # freebsd-update install
> > # shutdown -r now
> > 
> > # freebsd-update IDS >> outfile.ids
> > 
> > I wanted to run it tonight, but since I don't know where my source tree
> > is, I can't continue.
> 
> That's the binary way of updating.

The kernel definitively was compiled.

>  If you'd update from source,
> the steps would usually involve first updating /usr/src (by
> whatever means, CVS no more, SVN or as part of a binary update
> that also keeps the OS sources current). To take this approach,
> the sources have to be complete. You can follow a -STABLE and
> even -CURRENT (-HEAD) branch if you like.
> 
> My suggestion would have been: If you have already used this
> method before, and maybe if your current system has been installed
> that way, you can "do it again"; if /usr/obj (the "result tree"
> for building world and kernel) is still present, only the
> "make installworld" steps would have been involved; even better,
> if you only have to deal with a few system components, a selective
> "make install" would have been sufficient.
> 
> However, it has already been suggested to utilize mtree, because
> a real re-installation isn't actually needed (as no files have
> been changed, only their permissions, and that can be checked
> and corrected using the /etc/mtree reference files).

# umount 
# mtree -U -f /etc/mtree

?

Regards,
Ralf


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Ralf Mardorf
On Sun, 2013-01-27 at 13:58 +0100, Polytropon wrote:
> > If you only will have to handle a few ports, using the "bare
> > ports method" (make) is probably the easiest way (in case
> > everything else stays definitely consistent).

What could become inconsistent without upgrading or downgrading? I
didn't update again, I e.g. kept the Chromium version with the security
risk, since, as you explained, there's no way to really control
dependency issues, when installing security updates.

If there should be a valid method I understand, to find out what ports
have wrong permissions, it would be nice, but I don't understand what to
do, the output I already have is hardly comprehensible and
understandable.

:)

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Ralf Mardorf
On Sun, 2013-01-27 at 13:58 +0100, Polytropon wrote:
> On Sun, 27 Jan 2013 15:38:38 +0700, Erich Dollansky wrote:
> > Hi,
> > 
> > On Sun, 27 Jan 2013 09:15:09 +0100
> > "Ralf Mardorf"  wrote:
> > > Is there a command to deinstall and reinstall all ports or an idea
> > > for a script to do it?
> > > 
> > Check portupgrade or one of other utilities to handle ports. There is
> > one option to force an upgrade even if it would be a downgrade.
> 
> With tools like portmaster, this task can easily be automated.
> If you only will have to handle a few ports, using the "bare
> ports method" (make) is probably the easiest way (in case
> everything else stays definitely consistent).

*?*

This is how I updated my ports, after I updated FreeBSD:

root@freebsd:/root # portmaster --list-origins > ~/installed-port-list
root@freebsd:/root # portsnap fetch update
root@freebsd:/root # portmaster -ty --clean-distfiles
root@freebsd:/root # portmaster --check-port-dbdir

delete? always y

root@freebsd:/root # portmaster -Faf
root@freebsd:/root # pkg_delete -a
root@freebsd:/root # rm -rf /usr/local/lib/compat/pkg

No backup of files in /usr/local, such as configuration files in  
/usr/local/etc needed.

root@freebsd:/root # ls -hAl /usr/local/bin
total 0
root@freebsd:/root # ls -hAl /usr/local/sbin
total 0
root@freebsd:/root # ls -hAl /usr/local/lib
total 12
drwxr-xr-x  4 root  wheel   512B Jan 18 16:17 X11
-r--r--r--  1 root  wheel   2.2k Jan 14 19:30 charset.alias
drwxr-xr-x  2 root  wheel   3.0k Jan 18 16:19 compat
drwxr-xr-x  2 root  wheel   1.0k Jan 18 16:10 dssi
root@freebsd:/root # ls -hAl /usr/local/lib/dssi
total 0
root@freebsd:/root # ls -hAl /usr/local/lib/compat
total 0
root@freebsd:/root # ls -hAl /usr/local/lib/X11
total 4
drwxr-xr-x  2 root  wheel   512B Jan 18 16:14 app-defaults
drwxr-xr-x  4 root  wheel   512B Jan 18 16:14 fonts
root@freebsd:/root # ls -hAl /var/db/pkg
total 9424
-rw-r--r--  1 root  wheel   9.2M Dec 23 22:42 pkgdb.db

root@freebsd:/root # cd /usr/ports/ports-mgmt/portmaster && make
deinstall  
install clean
root@freebsd:/usr/ports/ports-mgmt/portmaster # portmaster `cat  
~/installed-port-list`

I still had to manually answer yes a million times, when I was asked if
something should be deleted or not.

I stopped by Ctrl + C, add --no-confirm to the command and run it again.

I guess I need to add

--force-config -G -y -no-confirm
?


Compiling > 400, from > 800 packages needed > 2 day.
How do I reinstall all ports [1]? Is recompiling everything needed?
Isn't it possible to reinstall everything? Isn't there a cache with all
the binaries? Resp. the binaries are already installed ;) and could be
copied to a cache, tmp.

[1]
*?*
http://howtounix.info/man/FreeBSD/man8/portmaster.8
*?*

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Ralf Mardorf
PS:
On Mon, 2013-01-28 at 01:36 +0100, Ralf Mardorf wrote:
> # cd /usr/ports/misc/mc && make install clean
> # uname -r
> 8.3-RELEASE
> # freebsd-update -r 9.1-RELEASE upgrade
> # freebsd-update install
> # shutdown -r now
> 
> # freebsd-update install
> # cd /usr/ports/ports-mgmt/portupgrade && make install clean
> # /usr/local/sbin/portupgrade -f ruby
> # rm /var/db/pkg/pkgdb.db
> # /usr/local/sbin/portupgrade -f ruby18-bdb
> # rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db
> # /usr/local/sbin/portupgrade -af
> # freebsd-update install
> # shutdown -r now
> 
> # freebsd-update IDS >> outfile.ids

And I didn't, still don't understand how to set the BATCH-variable to
yes, so it didn't run automatically.
# setenv BASH yes
Is this correct?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Polytropon
On Mon, 28 Jan 2013 01:36:36 +0100, Ralf Mardorf wrote:
> On Sun, 2013-01-27 at 13:58 +0100, Polytropon wrote:
> > #  1.  `cd /usr/src'   (or to the directory containing your source 
> > tree).
> > #  2.  `make buildworld'
> > #  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is 
> > GENERIC).
> > #  4.  `make installkernel KERNCONF=YOUR_KERNEL_HERE'   (default is 
> > GENERIC).
> > #   [steps 3. & 4. can be combined by using the "kernel" target]
> > #  5.  `reboot'(in single user mode: boot -s from the loader 
> > prompt).
> > #  6.  `mergemaster -p'
> > #  7.  `make installworld'
> > #  8.  `make delete-old'
> > #  9.  `mergemaster'(you may wish to use -i, along with -U or 
> > -F).
> > # 10.  `reboot'
> > # 11.  `make delete-old-libs' (in case no 3rd party program uses them 
> > anymore)
> 
> 
> What source tree? I only checked out the kernel source using svn and
> IIRC it's using the /usr/src directory (I'm booted into Linux at the
> moment), without a subdirectory /kernel. I can delete the kernel source,
> since it's IMO fishy to have headers of another revision, than the
> kernel is, but when I asked, I got a reply, that it should be ok for
> FreeBSD. However, I never used the kernel source.

The content of /usr/src does not only contain the kernel. It's
the whole OS, except of course you have only installed selected
parts of this tree. The file I've mentioned is at the top of
this structure: /usr/src/Makefile contains a short instruction
of how to install kernel and world (and explains other possible
targets).



> When I updated I did it like that (without subversion or cvs):
> 
> # cd /usr/ports/misc/mc && make install clean
> # uname -r
> 8.3-RELEASE
> # freebsd-update -r 9.1-RELEASE upgrade
> # freebsd-update install
> # shutdown -r now
> 
> # freebsd-update install
> # cd /usr/ports/ports-mgmt/portupgrade && make install clean
> # /usr/local/sbin/portupgrade -f ruby
> # rm /var/db/pkg/pkgdb.db
> # /usr/local/sbin/portupgrade -f ruby18-bdb
> # rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db
> # /usr/local/sbin/portupgrade -af
> # freebsd-update install
> # shutdown -r now
> 
> # freebsd-update IDS >> outfile.ids
> 
> I wanted to run it tonight, but since I don't know where my source tree
> is, I can't continue.

That's the binary way of updating. If you'd update from source,
the steps would usually involve first updating /usr/src (by
whatever means, CVS no more, SVN or as part of a binary update
that also keeps the OS sources current). To take this approach,
the sources have to be complete. You can follow a -STABLE and
even -CURRENT (-HEAD) branch if you like.

My suggestion would have been: If you have already used this
method before, and maybe if your current system has been installed
that way, you can "do it again"; if /usr/obj (the "result tree"
for building world and kernel) is still present, only the
"make installworld" steps would have been involved; even better,
if you only have to deal with a few system components, a selective
"make install" would have been sufficient.

However, it has already been suggested to utilize mtree, because
a real re-installation isn't actually needed (as no files have
been changed, only their permissions, and that can be checked
and corrected using the /etc/mtree reference files).




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Ralf Mardorf
On Sun, 2013-01-27 at 13:58 +0100, Polytropon wrote:
> #  1.  `cd /usr/src'   (or to the directory containing your source tree).
> #  2.  `make buildworld'
> #  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
> #  4.  `make installkernel KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC).
> #   [steps 3. & 4. can be combined by using the "kernel" target]
> #  5.  `reboot'(in single user mode: boot -s from the loader prompt).
> #  6.  `mergemaster -p'
> #  7.  `make installworld'
> #  8.  `make delete-old'
> #  9.  `mergemaster'(you may wish to use -i, along with -U or -F).
> # 10.  `reboot'
> # 11.  `make delete-old-libs' (in case no 3rd party program uses them anymore)


What source tree? I only checked out the kernel source using svn and
IIRC it's using the /usr/src directory (I'm booted into Linux at the
moment), without a subdirectory /kernel. I can delete the kernel source,
since it's IMO fishy to have headers of another revision, than the
kernel is, but when I asked, I got a reply, that it should be ok for
FreeBSD. However, I never used the kernel source.

When I updated I did it like that (without subversion or cvs):

# cd /usr/ports/misc/mc && make install clean
# uname -r
8.3-RELEASE
# freebsd-update -r 9.1-RELEASE upgrade
# freebsd-update install
# shutdown -r now

# freebsd-update install
# cd /usr/ports/ports-mgmt/portupgrade && make install clean
# /usr/local/sbin/portupgrade -f ruby
# rm /var/db/pkg/pkgdb.db
# /usr/local/sbin/portupgrade -f ruby18-bdb
# rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db
# /usr/local/sbin/portupgrade -af
# freebsd-update install
# shutdown -r now

# freebsd-update IDS >> outfile.ids

I wanted to run it tonight, but since I don't know where my source tree
is, I can't continue.

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Ralf Mardorf
On Sun, 27 Jan 2013 15:28:47 +0100, Erich Dollansky  
 wrote:

I think that installing it in multi-user mode without other users having
things running, will work in 99.% of the cases. In his special
case, it will work 100% as only the permissions should et changed.


I think so, but I asked, because world might be a more serious issue, than  
Opera and Jack are.


Btw. I even run a complete port upgarde during a X session. I didn't  
launch apps or did hard work, but kept Opera open. Reading mails become  
impossible, but writing mails and using the browser was possible all the  
time.


Today I take a rest ;).

Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Erich Dollansky
Hi,

On Sun, 27 Jan 2013 13:58:06 +0100
Polytropon  wrote:

> On Sun, 27 Jan 2013 15:38:38 +0700, Erich Dollansky wrote:
> > Hi,
> > 
> > On Sun, 27 Jan 2013 09:15:09 +0100
> > "Ralf Mardorf"  wrote:
> > 
> > > Good morning,
> > 
> > ood morning? The sun is settling soon!
> 
> The sun of the planet of the ood?
> Or the former Sun of one of the microsystems? :-)
> 
both Suns are gone now. Only one will return tomorrow morning.
> 
> 
> > > if I run 'make deinstall reinstall' for a port, it doesn't ask a
> > > single question, at least not for dbus.
> > > 
> > > # ls -l /usr/local/bin/dbus-daemon
> > > -r-xr-xr-x  1 rocketmouse  wheel  377744 Jan 18 22:44  
> > > /usr/local/bin/dbus-daemon
> > > 
> > > # cd /usr/ports/devel/dbus ; make deinstall reinstall
> > > 
> > > # ls -l /usr/local/bin/dbus-daemon
> > > -r-xr-xr-x  1 root  wheel  377744 Jan 27
> > > 08:55 /usr/local/bin/dbus-daemon
> > > 
> > > Is there a command to deinstall and reinstall all ports or an idea
> > > for a script to do it?
> > > 
> > Check portupgrade or one of other utilities to handle ports. There
> > is one option to force an upgrade even if it would be a downgrade.
> 
> With tools like portmaster, this task can easily be automated.
> If you only will have to handle a few ports, using the "bare
> ports method" (make) is probably the easiest way (in case
> everything else stays definitely consistent).
> 
I would say that - especially in his case - he will get a working
system as he does not want to upgrade a single port.
> 
> 
> > > Do I have to reboot into single user mode and then to run "make  
> > > installworld" only to reinstall world?
> > 
> > No, you just run it as root. It should work afterword except for
> > currently running programs.
> 
> The comment header of /usr/src/Makefile suggests installing the
> world in single user mode (steps 5 - 11).
> 
I think that installing it in multi-user mode without other users having
things running, will work in 99.% of the cases. In his special
case, it will work 100% as only the permissions should et changed.

> #  1.  `cd /usr/src'   (or to the directory containing your
> source tree). #  2.  `make buildworld'
> #  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is
> GENERIC). #  4.  `make installkernel
> KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC). #   [steps 3.
> & 4. can be combined by using the "kernel" target] #  5.
> `reboot'(in single user mode: boot -s from the loader
> prompt). #  6.  `mergemaster -p' #  7.  `make installworld'
> #  8.  `make delete-old'
> #  9.  `mergemaster'(you may wish to use -i, along with
> -U or -F). # 10.  `reboot'
> # 11.  `make delete-old-libs' (in case no 3rd party program uses them
> anymore)
> 
> This should be the safest method.
> 
> 

Isn't it the overkill in his situation?

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Polytropon
On Sun, 27 Jan 2013 15:38:38 +0700, Erich Dollansky wrote:
> Hi,
> 
> On Sun, 27 Jan 2013 09:15:09 +0100
> "Ralf Mardorf"  wrote:
> 
> > Good morning,
> 
> ood morning? The sun is settling soon!

The sun of the planet of the ood?
Or the former Sun of one of the microsystems? :-)



> > if I run 'make deinstall reinstall' for a port, it doesn't ask a
> > single question, at least not for dbus.
> > 
> > # ls -l /usr/local/bin/dbus-daemon
> > -r-xr-xr-x  1 rocketmouse  wheel  377744 Jan 18 22:44  
> > /usr/local/bin/dbus-daemon
> > 
> > # cd /usr/ports/devel/dbus ; make deinstall reinstall
> > 
> > # ls -l /usr/local/bin/dbus-daemon
> > -r-xr-xr-x  1 root  wheel  377744 Jan 27
> > 08:55 /usr/local/bin/dbus-daemon
> > 
> > Is there a command to deinstall and reinstall all ports or an idea
> > for a script to do it?
> > 
> Check portupgrade or one of other utilities to handle ports. There is
> one option to force an upgrade even if it would be a downgrade.

With tools like portmaster, this task can easily be automated.
If you only will have to handle a few ports, using the "bare
ports method" (make) is probably the easiest way (in case
everything else stays definitely consistent).



> > Do I have to reboot into single user mode and then to run "make  
> > installworld" only to reinstall world?
> 
> No, you just run it as root. It should work afterword except for
> currently running programs.

The comment header of /usr/src/Makefile suggests installing the
world in single user mode (steps 5 - 11).

#  1.  `cd /usr/src'   (or to the directory containing your source tree).
#  2.  `make buildworld'
#  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
#  4.  `make installkernel KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC).
#   [steps 3. & 4. can be combined by using the "kernel" target]
#  5.  `reboot'(in single user mode: boot -s from the loader prompt).
#  6.  `mergemaster -p'
#  7.  `make installworld'
#  8.  `make delete-old'
#  9.  `mergemaster'(you may wish to use -i, along with -U or -F).
# 10.  `reboot'
# 11.  `make delete-old-libs' (in case no 3rd party program uses them anymore)

This should be the safest method.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Erich Dollansky
Hi,

On Sun, 27 Jan 2013 09:15:09 +0100
"Ralf Mardorf"  wrote:

> Good morning,

ood morning? The sun is settling soon!
> 
> if I run 'make deinstall reinstall' for a port, it doesn't ask a
> single question, at least not for dbus.
> 
> # ls -l /usr/local/bin/dbus-daemon
> -r-xr-xr-x  1 rocketmouse  wheel  377744 Jan 18 22:44  
> /usr/local/bin/dbus-daemon
> 
> # cd /usr/ports/devel/dbus ; make deinstall reinstall
> 
> # ls -l /usr/local/bin/dbus-daemon
> -r-xr-xr-x  1 root  wheel  377744 Jan 27
> 08:55 /usr/local/bin/dbus-daemon
> 
> Is there a command to deinstall and reinstall all ports or an idea
> for a script to do it?
> 
Check portupgrade or one of other utilities to handle ports. There is
one option to force an upgrade even if it would be a downgrade.

> Do I have to reboot into single user mode and then to run "make  
> installworld" only to reinstall world?

No, you just run it as root. It should work afterword except for
currently running programs.

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-27 Thread Ralf Mardorf

Good morning,

if I run 'make deinstall reinstall' for a port, it doesn't ask a single  
question, at least not for dbus.


# ls -l /usr/local/bin/dbus-daemon
-r-xr-xr-x  1 rocketmouse  wheel  377744 Jan 18 22:44  
/usr/local/bin/dbus-daemon


# cd /usr/ports/devel/dbus ; make deinstall reinstall

# ls -l /usr/local/bin/dbus-daemon
-r-xr-xr-x  1 root  wheel  377744 Jan 27 08:55 /usr/local/bin/dbus-daemon

Is there a command to deinstall and reinstall all ports or an idea for a  
script to do it?


Do I have to reboot into single user mode and then to run "make  
installworld" only to reinstall world?


Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-26 Thread Polytropon
On Sat, 26 Jan 2013 10:11:37 +0100, Ralf Mardorf wrote:
> On Sat, 2013-01-26 at 08:49 +0100, Polytropon wrote:
> > On Fri, 25 Jan 2013 23:22:29 +0100, Ralf Mardorf wrote:
> > > On Fri, 25 Jan 2013 22:51:55 +0100, Joshua Isom  wrote:
> > > > Sorry if my original command ended up breaking your system
> > > 
> > > Don't worry, I run dump to backup it, but I'll try to fix it without  
> > > restoring it from the backup.
> > 
> > Maybe you can read the original owners from that backup and
> > just _change them_ accordingly? As the files haven't been
> > altered, there would be no need to rewrite them entirely.
> 
> I used dump and can't find how to extract something from the dump files.
> If I would restore from a dump I would lose something, since the dump is
> some days old and I worked on my FreeBSD.

Maybe something along "restore -t" is possible, as you only
would want to extract owner information and nothing more.
That information could be used to chown the files which need
that change.




> If it would be possible to write a script that does rebuild everything,
> with the same configs and _without the need of user interaction_ I would
> rebuild and if needed update (at least Chromium) everything. But last
> time there were still yes/no (should I delete this file) questions all
> the times.

Maybe you can do a separate check for /usr/local (installed
ports) and "everything else" (and both excluding /home).
The one is cured by the "mtree magic" (or "make installworld"
in worst case), the other by reinstalling ports that need
it (or, if only few files are affected, to check the "install"
directives in the Makefile and do it manually).




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-26 Thread Polytropon
On Sat, 26 Jan 2013 10:01:18 +0100, Ralf Mardorf wrote:
> On Sat, 2013-01-26 at 08:48 +0100, Polytropon wrote:
> > On Fri, 25 Jan 2013 16:15:28 -0600, Joshua Isom wrote:
> > > As for the listings in /usr/local 
> > > they'll need fixed.  On my system, almost everything's owned by root. 
> > 
> > There are a few exceptions when files are owned by a daemon.
> > As I said, re-installing those parts (or even world) should
> > fix this, but maybe it's possible to apply some "mtree magic"
> > to fix the owner to the proper one (root in most cases).
> 
> Rebuilding world only shouldn't take that long.

If you still have the /usr/obj subtree where you installed
world from last time, you only need to "make installworld"
(as explained in /usr/src/Makefile's comment header).

There has also been a very good advice on how to use mtree
to do this (as the files don't need re-installation per se,
because they haven't changed).



> > > The man directories are owned by man, and 
> > > /usr/local/libexec/polkit-set-default-helper is set as polkit:polkit.
> > 
> > That's a good example for the non-root exceptions; there might
> > be others.
> 
> There are others on my system, so I can't simply run chown -R :(.

That's correct. If you can spot those "irregularities" in
/usr/local, it seems to be the safest way to re-install
the ports those files belong to.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-26 Thread Ralf Mardorf
On Sat, 2013-01-26 at 08:49 +0100, Polytropon wrote:
> On Fri, 25 Jan 2013 23:22:29 +0100, Ralf Mardorf wrote:
> > On Fri, 25 Jan 2013 22:51:55 +0100, Joshua Isom  wrote:
> > > Sorry if my original command ended up breaking your system
> > 
> > Don't worry, I run dump to backup it, but I'll try to fix it without  
> > restoring it from the backup.
> 
> Maybe you can read the original owners from that backup and
> just _change them_ accordingly? As the files haven't been
> altered, there would be no need to rewrite them entirely.

I used dump and can't find how to extract something from the dump files.
If I would restore from a dump I would lose something, since the dump is
some days old and I worked on my FreeBSD.

If it would be possible to write a script that does rebuild everything,
with the same configs and _without the need of user interaction_ I would
rebuild and if needed update (at least Chromium) everything. But last
time there were still yes/no (should I delete this file) questions all
the times.

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-26 Thread Ralf Mardorf
On Sat, 2013-01-26 at 08:48 +0100, Polytropon wrote:
> On Fri, 25 Jan 2013 16:15:28 -0600, Joshua Isom wrote:
> > Ignore /proc, unmount it even.  You don't need it on FreeBSD and 
> > shouldn't expect it to be there. 
> 
> As far as I know, Gnome (or at least GDM) _requires_ it to
> be able to show the available user names. I have no idea
> why. :-)

IIUC not GDM does need it, but GNOME.

> > As for the listings in /usr/local 
> > they'll need fixed.  On my system, almost everything's owned by root. 
> 
> There are a few exceptions when files are owned by a daemon.
> As I said, re-installing those parts (or even world) should
> fix this, but maybe it's possible to apply some "mtree magic"
> to fix the owner to the proper one (root in most cases).

Rebuilding world only shouldn't take that long.

> > The man directories are owned by man, and 
> > /usr/local/libexec/polkit-set-default-helper is set as polkit:polkit.
> 
> That's a good example for the non-root exceptions; there might
> be others.

There are others on my system, so I can't simply run chown -R :(.

Regards,
Ralf

PS: At the moment I'm booted into Linux, I'll take a look at all the
hints later today. Thank you all.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Polytropon
On Fri, 25 Jan 2013 16:15:28 -0600, Joshua Isom wrote:
> Ignore /proc, unmount it even.  You don't need it on FreeBSD and 
> shouldn't expect it to be there. 

As far as I know, Gnome (or at least GDM) _requires_ it to
be able to show the available user names. I have no idea
why. :-)



> As for the listings in /usr/local 
> they'll need fixed.  On my system, almost everything's owned by root. 

There are a few exceptions when files are owned by a daemon.
As I said, re-installing those parts (or even world) should
fix this, but maybe it's possible to apply some "mtree magic"
to fix the owner to the proper one (root in most cases).



> The man directories are owned by man, and 
> /usr/local/libexec/polkit-set-default-helper is set as polkit:polkit.

That's a good example for the non-root exceptions; there might
be others.



> There's a difference between lib directories and libexec directories. 
> Libraries are stored in lib and programs you're not expected to invoke 
> yourself are stored in libexec.

Correct. That's why my printer filters are in /opt/libexec. ;-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Polytropon
On Fri, 25 Jan 2013 23:22:29 +0100, Ralf Mardorf wrote:
> On Fri, 25 Jan 2013 22:51:55 +0100, Joshua Isom  wrote:
> > Sorry if my original command ended up breaking your system
> 
> Don't worry, I run dump to backup it, but I'll try to fix it without  
> restoring it from the backup.

Maybe you can read the original owners from that backup and
just _change them_ accordingly? As the files haven't been
altered, there would be no need to rewrite them entirely.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Ralf Mardorf

On Fri, 25 Jan 2013 22:51:55 +0100, Joshua Isom  wrote:

Sorry if my original command ended up breaking your system


Don't worry, I run dump to backup it, but I'll try to fix it without  
restoring it from the backup.


--
Technology doesn't necessarily make you smarter
http://lists.alioth.debian.org/pipermail/d-community-offtopic/2013-January/000172.html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Joshua Isom

On 1/25/2013 3:25 PM, Ralf Mardorf wrote:

It still does list directories in /home :(.

This file definitively only is in /home:

$ grep find_ find_1000.txt
-rw-r--r--   1 root rocketmouse 81920 Jan 25 20:52
find_1000.txt
$ ls -ld find_1000.txt
-rw-r--r--  1 root  rocketmouse  513434 Jan 25 21:14 find_1000.txt

Others seemingly are from home too, e.g. [1].

Apart from that there are files in /lib and /usr with a wrong owner I
missed before :(.

I don't have the leisure to check the whole output right now. I'm just
curious, so I had a brief look [1].

Regards,
Ralf




Ignore /proc, unmount it even.  You don't need it on FreeBSD and 
shouldn't expect it to be there.  As for the listings in /usr/local 
they'll need fixed.  On my system, almost everything's owned by root. 
The man directories are owned by man, and 
/usr/local/libexec/polkit-set-default-helper is set as polkit:polkit.


There's a difference between lib directories and libexec directories. 
Libraries are stored in lib and programs you're not expected to invoke 
yourself are stored in libexec.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Joshua Isom

On 1/25/2013 9:12 AM, Polytropon wrote:

On Fri, 25 Jan 2013 15:26:23 +0100, Ralf Mardorf wrote:

On Fri, 25 Jan 2013 15:04:14 +0100, Polytropon  wrote:

% ls -lR / | grep -v "/home" | grep "rocketmouse"


It's better I umount at least Arch Linux.


True. :-)




There anyway is an issue, it doesn't show the pass, I checked this with

$ ls -lR /home/ | grep -v "/home"

after running

$ ls -lR / | grep -v "/home" | grep "rocketmouse"

IOW I get tons of files, but don't know to which directory they belong.


Sorry, that was something I didn't take into mind, you're right.
Maybe this command is more efficient:

# find / -exec ls -l {} \; | grep -v "/home" | grep "rocketmouse"

It may be a good idea to send the output into a temporary file
and check it when the command has finished. As I said, you will
probably see some "false positives", but look for anything
strange in /usr.




Since there was a comment about cats, you can also use this.

find / -not \( -name home -prune \) -uid 1000 -or -gid 1000 -ls

Sorry if my original command ended up breaking your system, but at least 
you're getting to learn how to fix problems without just wiping and 
starting over from scratch.  I once was in /tmp and ran "rm -rf .*" to 
delete all hidden directories in /tmp.  I realized a problem when it 
tried to delete files in /usr that aren't deletable without changing 
permissions.  I was able to recover and reinstall from /usr/src.  The rm 
had wiped out /boot.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Ralf Mardorf

It still does list directories in /home :(.

This file definitively only is in /home:

$ grep find_ find_1000.txt
-rw-r--r--   1 root rocketmouse 81920 Jan 25 20:52  
find_1000.txt

$ ls -ld find_1000.txt
-rw-r--r--  1 root  rocketmouse  513434 Jan 25 21:14 find_1000.txt

Others seemingly are from home too, e.g. [1].

Apart from that there are files in /lib and /usr with a wrong owner I  
missed before :(.


I don't have the leisure to check the whole output right now. I'm just  
curious, so I had a brief look [1].


Regards,
Ralf

[1]
$ ls -ld /home/rocketmouse/.gnome2
drwx--  7 rocketmouse  rocketmouse  512 Jan 24 18:14  
/home/rocketmouse/.gnome2

$ ls -ld /root/.gnome2
drwxr-xr-x  6 root  wheel  512 Jan 25 00:01 /root/.gnome2
$ grep "gnome2" find_1000.txt
drwx--   7 rocketmouse  rocketmouse   512 Jan 24 18:14 .gnome2
drwx--   2 rocketmouse  rocketmouse   512 Jan 12 02:56  
.gnome2_private

$
$
$
$
$
$
$
$ grep lib find_1000.txt
-r-xr-xr-x  1 rocketmouse  wheel  71008 Jan 20 02:12  
/usr/local/lib/xfce4/xfconf/xfconfd
-r-xr-xr-x  1 rocketmouse  wheel  25672 Jan 20 02:21  
/usr/local/lib/xfce4/panel/wrapper
-r-xr-xr-x  1 rocketmouse  wheel  74600 Jan 18 22:04  
/usr/local/libexec/gam_server
-r-xr-xr-x  1 rocketmouse  wheel  66536 Jan 18 22:51  
/usr/local/libexec/gconfd-2
-r-xr-xr-x  1 rocketmouse  wheel  141384 Jan 18 23:55  
/usr/local/libexec/gvfsd
-r-xr-xr-x  1 rocketmouse  wheel  157000 Jan 18 23:55  
/usr/local/libexec/gvfsd-trash
-r-xr-xr-x  1 rocketmouse  wheel  100032 Jan 18 23:55  
/usr/local/libexec/gvfs-hal-volume-monitor
-r-xr-xr-x  1 rocketmouse  wheel  70992 Jan 18 23:55  
/usr/local/libexec/gvfs-gphoto2-volume-monitor
-r-xr-xr-x  1 rocketmouse  wheel  66960 Jan 19 15:36  
/usr/local/libexec/evolution/2.32/evolution-alarm-notify
-r-xr-xr-x  1 rocketmouse  wheel  92080 Jan 19 19:09  
/usr/local/libexec/gdm-session-worker
-r-xr-xr-x  1 rocketmouse  wheel  67672 Jan 20 02:36  
/usr/local/libexec/xfce4/panel-plugins/xfce4-xkb-plugin
-r-sr-xr-x  1 rocketmouse  wheel  13864 Jan 20 02:34  
/usr/local/libexec/gnome-pty-helper
-rw-r--r--  1 rocketmouse  rocketmouse   276 Jan 13 22:58  
http%3A%2F%2Fapps.linuxaudio.org%2Flib%2Ftpl%2Flau2%2Fimages%2Ffavicon.png
-rw-r--r--  1 rocketmouse  rocketmouse   447 Jan 19 20:07  
http%3A%2F%2Fwiki.bash-hackers.org%2Flib%2Ftpl%2Farctic%2Fimages%2Ffavicon.png
-rw-r--r--  1 rocketmouse  rocketmouse   700 Jan 15 09:39  
http%3A%2F%2Fwiki.bsdforen.de%2Flib%2Ftpl%2Fmonobook%2Fuser%2Ffavicon.png
-rw-r--r--  1 rocketmouse  rocketmouse   276 Jan 14 01:43  
http%3A%2F%2Fwiki.linuxaudio.org%2Flib%2Ftpl%2Flau2%2Fimages%2Ffavicon.png
-rw-r--r--  1 rocketmouse  rocketmouse   447 Jan 22 22:34  
http%3A%2F%2Fwiki.linuxmusicians.com%2Flib%2Ftpl%2Fdefault%2Fimages%2Ffavicon.png
-rw-r--r--  1 rocketmouse  rocketmouse   147 Jan 13 15:38  
http%3A%2F%2Fwww.freebsdsoftware.org%2Fwp-content%2Fthemes%2Fthesis%2Flib%2Fimages%2Ficon-swatch.png
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/libexec/gnome-pty-helper
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 /proc/8448/file ->  
/usr/local/libexec/gnome-pty-helper
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/libexec/gvfsd-metadata
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 /proc/3053/file ->  
/usr/local/libexec/gvfsd-metadata
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/lib/opera/opera
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 /proc/2282/file ->  
/usr/local/lib/opera/opera
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/libexec/gvfsd-trash
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 /proc/2265/file ->  
/usr/local/libexec/gvfsd-trash
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/libexec/gconfd-2
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 /proc/2175/file ->  
/usr/local/libexec/gconfd-2
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/libexec/gvfs-gphoto2-volume-monitor
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 /proc/2173/file ->  
/usr/local/libexec/gvfs-gphoto2-volume-monitor
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/libexec/gvfs-hal-volume-monitor
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 /proc/2171/file ->  
/usr/local/libexec/gvfs-hal-volume-monitor
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/libexec/xfce4/panel-plugins/xfce4-xkb-plugin
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 /proc/2166/file ->  
/usr/local/libexec/xfce4/panel-plugins/xfce4-xkb-plugin
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/lib/xfce4/panel/wrapper
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 /proc/2165/file ->  
/usr/local/lib/xfce4/panel/wrapper
lr--r--r--  1 rocketmouse  rocketmouse  0 Jan 25 21:14 file ->  
/usr/local/lib/xfce4/panel/wrapper
lr--r-

Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Polytropon
On Fri, 25 Jan 2013 20:41:24 +0100, Ralf Mardorf wrote:
> On Fri, 25 Jan 2013 16:12:15 +0100, Polytropon  wrote:
> > find / -exec ls -l {} \; | grep -v "/home" | grep "rocketmouse"
> 
> -r-xr-xr-x   1 rocketmouse  wheel  32736 Dec 23 18:38 ssh-agent
> -r-xr-xr-x  1 rocketmouse  wheel  32736 Dec 23 18:38 /usr/bin/ssh-agent
> ^C

Definitely to be changed.



> A lot of stuff from /tmp is shown without a path, however

That will probably be the "false-positives" I mentioned.



> root@freebsd:/usr/home/rocketmouse # ls -l /usr/bin/ssh-agent
> -r-xr-xr-x  1 rocketmouse  wheel  32736 Dec 23 18:38 /usr/bin/ssh-agent
> 
> but without write permission.

The permissions haven't change (they're correct), just the
owner is wrong.

For comparison:

-r-xr-xr-x  1 root  wheel  23428 2011-08-21 20:24:03 /usr/bin/ssh-agent*

The program is installed without the w attribute by default.



> I now run
> 
> root@freebsd:/usr/home/rocketmouse # find / -exec ls -l {} \; | grep -v  
> "/home" | grep "rocketmouse" > find_1000.txt
> 
> and will take a look at it tomorrow.

That will be an interesting read. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Ralf Mardorf

On Fri, 25 Jan 2013 16:12:15 +0100, Polytropon  wrote:

find / -exec ls -l {} \; | grep -v "/home" | grep "rocketmouse"


-r-xr-xr-x   1 rocketmouse  wheel  32736 Dec 23 18:38 ssh-agent
-r-xr-xr-x  1 rocketmouse  wheel  32736 Dec 23 18:38 /usr/bin/ssh-agent
^C

A lot of stuff from /tmp is shown without a path, however

root@freebsd:/usr/home/rocketmouse # ls -l /usr/bin/ssh-agent
-r-xr-xr-x  1 rocketmouse  wheel  32736 Dec 23 18:38 /usr/bin/ssh-agent

but without write permission.

I now run

root@freebsd:/usr/home/rocketmouse # find / -exec ls -l {} \; | grep -v  
"/home" | grep "rocketmouse" > find_1000.txt


and will take a look at it tomorrow.

Thank you :).

Regards,
Ralf

--
Technology doesn't necessarily make you smarter
http://lists.alioth.debian.org/pipermail/d-community-offtopic/2013-January/000172.html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Polytropon
On Fri, 25 Jan 2013 15:26:23 +0100, Ralf Mardorf wrote:
> On Fri, 25 Jan 2013 15:04:14 +0100, Polytropon  wrote:
> > % ls -lR / | grep -v "/home" | grep "rocketmouse"
> 
> It's better I umount at least Arch Linux.

True. :-)



> There anyway is an issue, it doesn't show the pass, I checked this with
> 
> $ ls -lR /home/ | grep -v "/home"
> 
> after running
> 
> $ ls -lR / | grep -v "/home" | grep "rocketmouse"
> 
> IOW I get tons of files, but don't know to which directory they belong.

Sorry, that was something I didn't take into mind, you're right.
Maybe this command is more efficient:

# find / -exec ls -l {} \; | grep -v "/home" | grep "rocketmouse"

It may be a good idea to send the output into a temporary file
and check it when the command has finished. As I said, you will
probably see some "false positives", but look for anything
strange in /usr.



> >> PPPoE was enabled automagically :).
> >
> > You probably have the required magic in /etc/rc.conf. :-)
> 
> Yes, but it wasn't started, when the owner for /usr/bin/su wasn't root.

That was to be expected. :-)



On Fri, 25 Jan 2013 15:32:38 +0100, Ralf Mardorf wrote:
> PS:
> 
> I guess the output is different for user and root and it does remove the  
> path, but anyway display also contend of /home.

Yes, access permissions matter a lot, so the command should be
run as root.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Ralf Mardorf

PS:

On Fri, 25 Jan 2013 15:26:23 +0100, Ralf Mardorf  
 wrote:

There anyway is an issue, it doesn't show the pass, I checked this with

$ ls -lR /home/ | grep -v "/home"

after running

$ ls -lR / | grep -v "/home" | grep "rocketmouse"

IOW I get tons of files, but don't know to which directory they belong.


I guess the output is different for user and root and it does remove the  
path, but anyway display also contend of /home.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Ralf Mardorf

On Fri, 25 Jan 2013 15:04:14 +0100, Polytropon  wrote:

% ls -lR / | grep -v "/home" | grep "rocketmouse"


It's better I umount at least Arch Linux.

# cat /etc/fstab
# DeviceMountpoint  FStype  Options Dump Pass
/dev/ad4s1b noneswapsw  0   0
/dev/ad4s1a /   ufs rw  1   1
/dev/ad4s1e /tmpufs rw  2   2
/dev/ad4s1f /usrufs rw  2   2
/dev/ad4s1d /varufs rw  2   2
/dev/acd0   /cdrom  cd9660  ro,noauto   0   0
proc/proc   procfs  rw  0   0
/dev/ada0s8 /mnt/dump   ext2fs  rw  0   0
/dev/ada0s9 /mnt/archlinux  ext2fs  rw  0   0

# umount /dev/ada0s8
# umount /dev/ada0s9

There anyway is an issue, it doesn't show the pass, I checked this with

$ ls -lR /home/ | grep -v "/home"

after running

$ ls -lR / | grep -v "/home" | grep "rocketmouse"

IOW I get tons of files, but don't know to which directory they belong.


PPPoE was enabled automagically :).


You probably have the required magic in /etc/rc.conf. :-)


Yes, but it wasn't started, when the owner for /usr/bin/su wasn't root.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Polytropon
On Fri, 25 Jan 2013 14:48:19 +0100, Ralf Mardorf wrote:
> On Fri, 25 Jan 2013 13:33:46 +0100, Polytropon  wrote:
> >> $ ls -l `which su`
> >> -r-sr-xr-x  1 rocketmouse  wheel  16880 Dec 23 18:38 /usr/bin/su
> >
> > Erm... that looks horribly wrong.
> >
> > The permissions indicate that setuid is set, but the file
> > owner is wrong. For comparison:
> >
> > -r-sr-xr-x  1 root  wheel  14604 2011-08-21 20:24:28 /usr/bin/su*
> >
> > This program has to belong to root. It seems that your
> > attempt to reflect UID changes in the file permissions
> > exceeded the scope of this task: Programs of the OS
> > seem to be affected, which is definitely not good.
> 
> IMO setuid alone already is a security risk.

The su program is part of the operating system, so it can
safely be considered safe. :-)




> >> $ ls -l /home/ | grep rocketmouse
> >> drwxr-xr-x  28 rocketmouse  rocketmouse 1536 Jan 25 12:17  
> >> rocketmouse
> >
> > You can use ls -ld to omit the grep step. :-)
> 
> $ ls -ld /home/rocketmouse
> drwxr-xr-x  28 rocketmouse  rocketmouse  1536 Jan 25 13:19
> /home/rocketmouse
> 
> :)
> 
> I was sure that using grep is stupid and should have done a 'man ls',
> since 'help' wasn't helpful.

That's why "man ls" exists. :-)



> This issue and 'cat | grep' instead of grep
> only are common mistakes by many Linux users.

This reminds me to "useless use of 'cat'" which is often
used because it constructs a convenient and easy to read
"chain" of commands, but can often be avoided, especially
when files can be redirected from.



> > Do you have other files in /usr or even /usr/local that do
> > belong to rocketmouse (uid == 1000 or 1001) now? That should
> > not have happened...
> 
> /usr/binis ok
> /usr/includeis ok
> /usr/include/*  seem to be ok, I just checked some
> folders
> /usr/lib and /usr/lib/* are ok
> /usr/libdata and /usr/libdata/* are ok
> /usr/libexec and /usr/libexec/*/*   are ok
> /usr/ports  is ok
> /usr/ports/*seem to be ok, I just checked some
> folders
> /usr/sbin   is ok
> /usr/share  is ok
> /usr/share/*seem to be ok, I just checked some
> folders
> /usr/srcis ok
> /usr/src/*/*seem to be ok, I just checked some
> folders
> 
> /usr/local  is ok
> /usr/local/bin and /usr/local/bin/* are ok
> /usr/local/bootstrap* and [...]/*   are ok
> /usr/local/etc  is ok
> /usr/local/etc/*seem to be ok, at least PolicyKit and
> ConsoleKit are
> /usr/local/include  is ok
> [snip]
> 
> All /usr/local/* are ok and all /usr/local/*/* seem to be ok.
> Other directories in /usr and /usr/local are empty.

You can do something like this:

% ls -lR / | grep -v "/home" | grep "rocketmouse"

This will probably show some "false-positives" in /tmp and
maybe in /var, but should show nothing in /usr directly (or
in other top level system directories).



> OT: /usr/lib32 and /usr/lib32/* belong to the empty folders in /usr.

Allow me a polite note regarding terminology:

There are no folders. Those are called directories. This is
the valid technical term. A "folder" is the name of a typical
GUI representation element _for_ a directory.

Relations: "is a" vs. "represents a" or "looks like a".

I know it's common to call directories "folders", but this is
as wrong as calling a device driver "Bob". ;-)



> So
> FreeBSD is multi arch capable?
> (since there's /usr/ports/astro/google-earth for amd64, I suspect it is)

The system shares some stuff across architectures, and it's
possible to run 32 bit applications on a 64 bit system, so
specific "fixed bit width libraries" are provided. This is
reflected in naming conventions. Even though the installer
might create those directories in advance, it's possible
that they only receive content under specific circumstances.

Ports do usually work on both systems. Those that do _not_
have a checking mechanism in their Makefile that indicates
on which platform they don't build, or if they are designed
for one specific platform only.



> > Some programs check by whom they are called or who they
> > belong to; if that's != root when it is _supposed_ to
> > be root, that can cause problems, especially when it's
> > not a simple x (execute), but s (setuid) program like
> > an X display manager.
> 
> So I guess I only need to correct the owner for /usr/bin/su.

If that's the only occurance, it should be sufficient.



> $ ls -l /usr/bin/su
> -r-sr-xr-x  1 root  wheel  16880 Dec 23 18:38 /usr/bin/su
> 
> I wonder if setting suid is needed, while the kit family is installed. For  
> sure it's possible to add a rool to some kit config.

The su program is part of the OS, while things like PolicyKit
are additional software. It sounds doubleplusungood 

Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Ralf Mardorf

Thank you all :)

everything is ok now. I don't mark the thread as solved, since I still  
didn't set up Evolution.


On Fri, 25 Jan 2013 13:33:46 +0100, Polytropon  wrote:

$ ls -l `which su`
-r-sr-xr-x  1 rocketmouse  wheel  16880 Dec 23 18:38 /usr/bin/su


Erm... that looks horribly wrong.

The permissions indicate that setuid is set, but the file
owner is wrong. For comparison:

-r-sr-xr-x  1 root  wheel  14604 2011-08-21 20:24:28 /usr/bin/su*

This program has to belong to root. It seems that your
attempt to reflect UID changes in the file permissions
exceeded the scope of this task: Programs of the OS
seem to be affected, which is definitely not good.


IMO setuid alone already is a security risk.


$ ls -l /home/ | grep rocketmouse
drwxr-xr-x  28 rocketmouse  rocketmouse 1536 Jan 25 12:17  
rocketmouse


You can use ls -ld to omit the grep step. :-)


$ ls -ld /home/rocketmouse
drwxr-xr-x  28 rocketmouse  rocketmouse  1536 Jan 25 13:19
/home/rocketmouse

:)

I was sure that using grep is stupid and should have done a 'man ls',
since 'help' wasn't helpful. This issue and 'cat | grep' instead of grep
only are common mistakes by many Linux users. Thank you for the hint.


I think you can now spot a possible mistake for the file owner
change I mentioned above: Only files inside /home should have
been in the initial scope, but somehow -uid 1001 has been
avaluated true for /usr/bin/su, even though I cannot imagine
what should have caused this.


In this case /home and /mnt/*, but I understand what you mean.


Do you have other files in /usr or even /usr/local that do
belong to rocketmouse (uid == 1000 or 1001) now? That should
not have happened...


/usr/binis ok
/usr/includeis ok
/usr/include/*  seem to be ok, I just checked some
folders
/usr/lib and /usr/lib/* are ok
/usr/libdata and /usr/libdata/* are ok
/usr/libexec and /usr/libexec/*/*   are ok
/usr/ports  is ok
/usr/ports/*seem to be ok, I just checked some
folders
/usr/sbin   is ok
/usr/share  is ok
/usr/share/*seem to be ok, I just checked some
folders
/usr/srcis ok
/usr/src/*/*seem to be ok, I just checked some
folders

/usr/local  is ok
/usr/local/bin and /usr/local/bin/* are ok
/usr/local/bootstrap* and [...]/*   are ok
/usr/local/etc  is ok
/usr/local/etc/*seem to be ok, at least PolicyKit and
ConsoleKit are
/usr/local/include  is ok
[snip]

All /usr/local/* are ok and all /usr/local/*/* seem to be ok.
Other directories in /usr and /usr/local are empty.
OT: /usr/lib32 and /usr/lib32/* belong to the empty folders in /usr. So
FreeBSD is multi arch capable?
(since there's /usr/ports/astro/google-earth for amd64, I suspect it is)


Some programs check by whom they are called or who they
belong to; if that's != root when it is _supposed_ to
be root, that can cause problems, especially when it's
not a simple x (execute), but s (setuid) program like
an X display manager.


So I guess I only need to correct the owner for /usr/bin/su.

$ ls -l /usr/bin/su
-r-sr-xr-x  1 root  wheel  16880 Dec 23 18:38 /usr/bin/su

I wonder if setting suid is needed, while the kit family is installed. For  
sure it's possible to add a rool to some kit config.


Restart

PPPoE was enabled automagically :).

$ su
Password:
You have mail.
root@freebsd:/usr/home/rocketmouse # :)

Ctrl + Alt + F* will switch to ttyv* and su does work too. :)

So the switch to uid 1000 seem to be complete now, without any gaps.

On Fri, 25 Jan 2013 13:57:13 +0100, Erich Dollansky
 wrote:

Do not worry. This is the main advantage of FreeBSD over many other
operating systems. The chances are very, verhy high that you will find
help when needed.


For Linux it depends to the mailing list. it depends not only to the
traffic and kind of list, but also to the kind of people who are
subscribed.

Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Erich Dollansky
Hi Ralf,

On Fri, 25 Jan 2013 13:39:07 +0100
"Ralf Mardorf"  wrote:

> On Fri, 25 Jan 2013 13:25:07 +0100, Erich Dollansky  
>  wrote:
> > What happens on a normal TTY?
> >
> >> Ctrl + Alt + F2 >
> >
> > So, you can switch to them. Can you try a su here?
> 
> Ctrl + Alt + F* will open a ttyv*
> 
> I can log in as root, but if I log in as user, I can't run su
> successfully.

It all seems that Polytropon's idea is right. The owner of all system
files must be root. Try to set this back.
> 
> > Der Wald und die Baeume ...
> 
> Quite possibly that I miss the forest for the trees ;).
> 
Yeah, the old problem if IT.

> Regards,
> Ralf
> 
> PS: Btw. thank you all for your patience and effort.

Do not worry. This is the main advantage of FreeBSD over many other
operating systems. The chances are very, verhy high that you will find
help when needed.

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Polytropon
On Fri, 25 Jan 2013 13:39:07 +0100, Ralf Mardorf wrote:
> Hi Erich :)
> 
> On Fri, 25 Jan 2013 13:25:07 +0100, Erich Dollansky  
>  wrote:
> > What happens on a normal TTY?
> >
> >> Ctrl + Alt + F2 >
> >
> > So, you can switch to them. Can you try a su here?
> 
> Ctrl + Alt + F* will open a ttyv*
> 
> I can log in as root, but if I log in as user, I can't run su successfully.

Because as you quoted, the su binary doesn't have the UID 0,
this means it's not owned by root anymore which may have bad
influence on its runtime behaviour. :-)

You have:

-r-sr-xr-x  1 rocketmouse  wheel  16880 Dec 23 18:38 /usr/bin/su

You should have:

-r-sr-xr-x  1 root  wheel  14604 2011-08-21 20:24:28 /usr/bin/su*

As I mentioned in my previous message, somehow the UID change
had some strange side effects.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Ralf Mardorf

Hi Erich :)

On Fri, 25 Jan 2013 13:25:07 +0100, Erich Dollansky  
 wrote:

What happens on a normal TTY?


Ctrl + Alt + F2 >


So, you can switch to them. Can you try a su here?


Ctrl + Alt + F* will open a ttyv*

I can log in as root, but if I log in as user, I can't run su successfully.


Der Wald und die Baeume ...


Quite possibly that I miss the forest for the trees ;).

Regards,
Ralf

PS: Btw. thank you all for your patience and effort.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Polytropon
On Fri, 25 Jan 2013 13:05:51 +0100, Ralf Mardorf wrote:
> The user can't become root using Xfce Terminal Emulator or by ttyv1 (Ctrl  
> + Alt + F2). This was possible before I switched the uid.
> 
> Before the switch PPPoE was enabled automatically, now I have to do it  
> manually.
> 
> $ su
> su: not running setuid
> 
> $ ls -l `which su`
> -r-sr-xr-x  1 rocketmouse  wheel  16880 Dec 23 18:38 /usr/bin/su

Erm... that looks horribly wrong.

The permissions indicate that setuid is set, but the file
owner is wrong. For comparison:

-r-sr-xr-x  1 root  wheel  14604 2011-08-21 20:24:28 /usr/bin/su*

This program has to belong to root. It seems that your
attempt to reflect UID changes in the file permissions
exceeded the scope of this task: Programs of the OS
seem to be affected, which is definitely not good.



> $ ls -l /home/ | grep rocketmouse
> drwxr-xr-x  28 rocketmouse  rocketmouse 1536 Jan 25 12:17 rocketmouse

You can use ls -ld to omit the grep step. :-)



> $ id
> uid=1000(rocketmouse) gid=1000(rocketmouse)  
> groups=1000(rocketmouse),0(wheel)

Seems to be okay.



> Ctrl + Alt + F2 >
> '# ppp -ddial alice' does work
> '# find / -uid 1001 -exec chown 1000 '{}' \;' no messages
> '# find / -gid 1001 -exec chown :1000 '{}' \;' no messages
> > Ctrl + Alt + F9

I think you can now spot a possible mistake for the file owner
change I mentioned above: Only files inside /home should have
been in the initial scope, but somehow -uid 1001 has been
avaluated true for /usr/bin/su, even though I cannot imagine
what should have caused this.

Do you have other files in /usr or even /usr/local that do
belong to rocketmouse (uid == 1000 or 1001) now? That should
not have happened...



> Without success I again read some important messages of this thread in the  
> archive and googled regarding to the suid issue.

Some programs check by whom they are called or who they
belong to; if that's != root when it is _supposed_ to
be root, that can cause problems, especially when it's
not a simple x (execute), but s (setuid) program like
an X display manager.



> Any hints are welcome!

Check for defective permissions. In worst case, update
your system from source or binary to fix permissions.
Maybe there's also an "mtree trick" to do it.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Erich Dollansky
Hi,

On Fri, 25 Jan 2013 13:05:51 +0100
"Ralf Mardorf"  wrote:

> after running '# /usr/sbin/pwd_mkdb
> -d /etc /etc/master.passwd' (FWIW there were no messages)
> I can now log in to a user X session by GDM.
> 
this sounds so much better.

> The user can't become root using Xfce Terminal Emulator or by ttyv1
> (Ctrl  
> + Alt + F2). This was possible before I switched the uid.
> 
What happens on a normal TTY?

> Ctrl + Alt + F2 >

So, you can switch to them. Can you try a su here?

> '# ppp -ddial alice' does work
> '# find / -uid 1001 -exec chown 1000 '{}' \;' no messages
> '# find / -gid 1001 -exec chown :1000 '{}' \;' no messages
> > Ctrl + Alt + F9
> 
> Without success I again read some important messages of this thread
> in the archive and googled regarding to the suid issue.

Der Wald und die Baeume ...

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-25 Thread Ralf Mardorf

Hi :)

after running '# /usr/sbin/pwd_mkdb -d /etc /etc/master.passwd' (FWIW  
there were no messages)

I can now log in to a user X session by GDM.

The user can't become root using Xfce Terminal Emulator or by ttyv1 (Ctrl  
+ Alt + F2). This was possible before I switched the uid.


Before the switch PPPoE was enabled automatically, now I have to do it  
manually.


$ su
su: not running setuid

$ ls -l `which su`
-r-sr-xr-x  1 rocketmouse  wheel  16880 Dec 23 18:38 /usr/bin/su

$ ls -l /home/ | grep rocketmouse
drwxr-xr-x  28 rocketmouse  rocketmouse 1536 Jan 25 12:17 rocketmouse

$ ls -l /mnt | grep archlinux
drwxrwx---  21 rocketmouse  rocketmouse  4096 Oct 28 19:11 archlinux

$ id
uid=1000(rocketmouse) gid=1000(rocketmouse)  
groups=1000(rocketmouse),0(wheel)


Ctrl + Alt + F2 >
'# ppp -ddial alice' does work
'# find / -uid 1001 -exec chown 1000 '{}' \;' no messages
'# find / -gid 1001 -exec chown :1000 '{}' \;' no messages

Ctrl + Alt + F9


Without success I again read some important messages of this thread in the  
archive and googled regarding to the suid issue.


Any hints are welcome!

Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Polytropon
On Fri, 25 Jan 2013 08:32:55 +0100, Ralf Mardorf wrote:
> On Fri, 2013-01-25 at 08:03 +0100, Polytropon wrote:
> > UIDs and GIDs should match here. All files belonging to rocketmouse
> > should be 1000:1000 _and_ the name "rocketmouse" should be
> > associated to those numerical values (see files mentioned
> > above).
> 
> Yes, but because I missed to update the database X login asked for 1001.

Correct - several programs query that database instead of
the plain text files.



> > But pwd.db and spwd.db (the password databases with encrypted
> > content) don't reflect those informations!
> 
> So '# /usr/sbin/pwd_mkdb -d/etc /etc/master.passwd' is ok, regarding
> to ...

Yes, use that command.



> > "man pwd_mkdb" and rebuild
> > the databases.
> 
> -c and -u switches could be used too, but aren't needed, since the
> entries are correct.

It's not needed to make things that complicated (to selectively
deal with entries, for example). The simple thing of

# cd /etc
# pkd_mkdb /etc/master.passwd

should do the trick here.



> > If you would have used the "vipw" command to make the change
> > to the passwd (plain text) files, it would have called pwd_mkdb
> > after the change. But don't worry: Knowing those "low level hacks"
> > can be helpful in some worst-case scenario. :-)
> 
> And then I don't need to use vi, if the default text editor still should
> be vi.

The $EDITOR variable will be honored, and as long as the program
is available (and the terminal capabilities apply), it will work
as expected. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Polytropon
On Fri, 25 Jan 2013 07:51:30 +0100, Ralf Mardorf wrote:
> Thank you Kevin, thank you Erich,
> 
> On Thu, 2013-01-24 at 21:10 -0500, kpn...@pobox.com wrote:
> > The correct way to edit the password file is with the "vipw"
> > command. When you are done with your changes it rewrites the password
> > file AND rebuilds the password database.
> > 
> > I'm guessing you have a stale password database now. Use 'vipw' to 
> > make a trivial change and then save and exit out.
> 
> Ok, I used mcedit to make the changes before and will try vipw now,
> resp. ...

That won't make any difference. :-)

If your $EDITOR points to mcedit, _that_ editor will be used;
afterwards pwd_mkdb will be called and the binary database
files will be updated - and your changes will be fine.



> On Fri, 2013-01-25 at 10:06 +0700, Erich Dollansky wrote:
> > did you run something like?
> > 
> > /usr/sbin/pwd_mkdb -d/etc /etc/master.passwd
> 
> No, I didn't. I assume this is what vipw will do, so I can run this
> instead of using vipw?

Yes, because vipw can be seen as a chain "editor -> validate ->
update database", involving the "lower level" programs that you
can call yourself any time. :-)






-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Ralf Mardorf
On Fri, 2013-01-25 at 08:03 +0100, Polytropon wrote:
> You should have been reading my advice about changing the
> UID:GID in detail. :-)

I deleted it by accident from the until now _not_ shared mails, IOW I
deleted it from the FreeBSD mails only and missed it, when having a
brief look at the mailing list archive.

> UIDs and GIDs should match here. All files belonging to rocketmouse
> should be 1000:1000 _and_ the name "rocketmouse" should be
> associated to those numerical values (see files mentioned
> above).

Yes, but because I missed to update the database X login asked for 1001.

> But pwd.db and spwd.db (the password databases with encrypted
> content) don't reflect those informations!

So '# /usr/sbin/pwd_mkdb -d/etc /etc/master.passwd' is ok, regarding
to ...

> "man pwd_mkdb" and rebuild
> the databases.

-c and -u switches could be used too, but aren't needed, since the
entries are correct.

> If you would have used the "vipw" command to make the change
> to the passwd (plain text) files, it would have called pwd_mkdb
> after the change. But don't worry: Knowing those "low level hacks"
> can be helpful in some worst-case scenario. :-)

And then I don't need to use vi, if the default text editor still should
be vi.

Thank you!

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Polytropon
On Fri, 25 Jan 2013 02:11:27 +0100, Ralf Mardorf wrote:
> Hi all, hi Joshua,
> 
> On Thu, 2013-01-24 at 16:10 -0600, Joshua Isom wrote:
> > find / -uid 1001 -exec chown 1000 '{}' \;
> > find / -gid 1001 -exec chown :1000 '{}' \;
> 
> I made one mistake, when I run "find / -gid 1001 -exec chown :1000 '{}'
> \;" for the fist time, I did it without the ":". Later I run it without
> the typo.
> 
> There's a serious problem now, rocketmouse still is 1001.

You should have been reading my advice about changing the
UID:GID in detail. :-)

What you seem to be missing is a rebuild of the database
that reflects the content of the password files (where you
have properly made the changes 1001 -> 1000 in /etc/passwd,
/etc/master.passwd and /etc/group).

The command you're searching for is pwd_mkdb.



> .login_conf was '1000 1001', after I "chown 1001" it, to start X as
> user, it became 'rocketmouse 1001', the user rocketmouse still can't run
> a X session anymore.

UIDs and GIDs should match here. All files belonging to rocketmouse
should be 1000:1000 _and_ the name "rocketmouse" should be
associated to those numerical values (see files mentioned
above).



> After rebooting this is the output I get:

Rebooting is _not_ the way to make a probem magically
go away. :-)



> # id rocketmouse
> uid=1001(rocketmouse) gid=1001 groups=1001,0(wheel)

This means the change of 1001 -> 1000 has not been fully done,
in _all_ involved files.



> # ls -hAl /home/ | grep rocketmouse
> drwxr-xr-x  28 1000 rocketmouse   1.5k Jan 24 18:14 rocketmouse

Here, on "file system level", the UID has been changed to 1000
properly, but this UID still doesn't have a matching "name".



> # grep 100 /etc/group
> rocketmouse:*:1000:
> musicpd:*:1002:
> 
> # grep 100 /etc/passwd
> rocketmouse:*:1000:1000:Ralf:/home/rocketmouse:/bin/sh
> musicpd:*:1002:1002:Music Player Daemon:/home/musicpd:/usr/sbin/nologin
> 
> # grep 100 /etc/master.passwd
> rocketmouse:$1$3mMkzcfl
> $VuryrlzFZ92LmaC6cUOa/.:1000:1000::0:0:Ralf:/home/rocketmouse:/bin/sh
> musicpd:*LOCKED**:1002:1002:daemon:0:0:Music Player
> Daemon:/home/musicpd:/usr/sbin/nologin

All correct.

But pwd.db and spwd.db (the password databases with encrypted
content) don't reflect those informations!



> I repeated both find-chown several times and rebooted, nothing changed,
> it doesn't list any files anymore.

No, repeating what has already been done properly and then
rebooting is, as I said, not a way to make problems magically
go away. I don't know a setting where this should work... :-)

So here's what you need to do: Read "man pwd_mkdb" and rebuild
the databases.

If you would have used the "vipw" command to make the change
to the passwd (plain text) files, it would have called pwd_mkdb
after the change. But don't worry: Knowing those "low level hacks"
can be helpful in some worst-case scenario. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Ralf Mardorf
Thank you Kevin, thank you Erich,

On Thu, 2013-01-24 at 21:10 -0500, kpn...@pobox.com wrote:
> The correct way to edit the password file is with the "vipw"
> command. When you are done with your changes it rewrites the password
> file AND rebuilds the password database.
> 
> I'm guessing you have a stale password database now. Use 'vipw' to 
> make a trivial change and then save and exit out.

Ok, I used mcedit to make the changes before and will try vipw now,
resp. ...

On Fri, 2013-01-25 at 10:06 +0700, Erich Dollansky wrote:
> did you run something like?
> 
> /usr/sbin/pwd_mkdb -d/etc /etc/master.passwd

No, I didn't. I assume this is what vipw will do, so I can run this
instead of using vipw?

"Once the information has been verified, vipw uses pwd_mkdb(8) to update
the user database.  This is run in the background, and, at very large
sites could take severa minutes. Until this update is completed, the
password file is unavailable for other updates and the new information
is not available to programs." -
http://www.freebsd.org/cgi/man.cgi?query=vipw&sektion=8

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Erich Dollansky
Hi,

On Fri, 25 Jan 2013 02:11:27 +0100
Ralf Mardorf  wrote:

> Hi all, hi Joshua,
> 
> On Thu, 2013-01-24 at 16:10 -0600, Joshua Isom wrote:
> > find / -uid 1001 -exec chown 1000 '{}' \;
> > find / -gid 1001 -exec chown :1000 '{}' \;
> 
> I made one mistake, when I run "find / -gid 1001 -exec chown :1000
> '{}' \;" for the fist time, I did it without the ":". Later I run it
> without the typo.
> 
> There's a serious problem now, rocketmouse still is 1001.
> 
> .login_conf was '1000 1001', after I "chown 1001" it, to start X as
> user, it became 'rocketmouse 1001', the user rocketmouse still can't
> run a X session anymore.
> 
> After rebooting this is the output I get:
> 
> # id rocketmouse
> uid=1001(rocketmouse) gid=1001 groups=1001,0(wheel)
> 
> # ls -hAl /home/ | grep rocketmouse
> drwxr-xr-x  28 1000 rocketmouse   1.5k Jan 24 18:14 rocketmouse
> 
> # grep 100 /etc/group
> rocketmouse:*:1000:
> musicpd:*:1002:
> 
> # grep 100 /etc/passwd
> rocketmouse:*:1000:1000:Ralf:/home/rocketmouse:/bin/sh
> musicpd:*:1002:1002:Music Player
> Daemon:/home/musicpd:/usr/sbin/nologin
> 
> # grep 100 /etc/master.passwd
> rocketmouse:$1$3mMkzcfl
> $VuryrlzFZ92LmaC6cUOa/.:1000:1000::0:0:Ralf:/home/rocketmouse:/bin/sh
> musicpd:*LOCKED**:1002:1002:daemon:0:0:Music Player
> Daemon:/home/musicpd:/usr/sbin/nologin
> 
> I repeated both find-chown several times and rebooted, nothing
> changed, it doesn't list any files anymore.
> 
did you run something like?

/usr/sbin/pwd_mkdb -d/etc /etc/master.passwd

erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Ralf Mardorf
Hi all, hi Joshua,

On Thu, 2013-01-24 at 16:10 -0600, Joshua Isom wrote:
> find / -uid 1001 -exec chown 1000 '{}' \;
> find / -gid 1001 -exec chown :1000 '{}' \;

I made one mistake, when I run "find / -gid 1001 -exec chown :1000 '{}'
\;" for the fist time, I did it without the ":". Later I run it without
the typo.

There's a serious problem now, rocketmouse still is 1001.

.login_conf was '1000 1001', after I "chown 1001" it, to start X as
user, it became 'rocketmouse 1001', the user rocketmouse still can't run
a X session anymore.

After rebooting this is the output I get:

# id rocketmouse
uid=1001(rocketmouse) gid=1001 groups=1001,0(wheel)

# ls -hAl /home/ | grep rocketmouse
drwxr-xr-x  28 1000 rocketmouse   1.5k Jan 24 18:14 rocketmouse

# grep 100 /etc/group
rocketmouse:*:1000:
musicpd:*:1002:

# grep 100 /etc/passwd
rocketmouse:*:1000:1000:Ralf:/home/rocketmouse:/bin/sh
musicpd:*:1002:1002:Music Player Daemon:/home/musicpd:/usr/sbin/nologin

# grep 100 /etc/master.passwd
rocketmouse:$1$3mMkzcfl
$VuryrlzFZ92LmaC6cUOa/.:1000:1000::0:0:Ralf:/home/rocketmouse:/bin/sh
musicpd:*LOCKED**:1002:1002:daemon:0:0:Music Player
Daemon:/home/musicpd:/usr/sbin/nologin

I repeated both find-chown several times and rebooted, nothing changed,
it doesn't list any files anymore.

Regards,
Ralf


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Fwd: Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Joshua Isom

On 1/24/2013 3:26 AM, Ralf Mardorf wrote:

I was surpriesed, when Evolution from Linux had no permissions anymore
to access the mail folder, after
drwxrwx--- rocketmouse  wheel was stable for FreeBSD

I wasn't aware, that even between Linux only, the folders for mount
points share the same permissions, once the partition is mounted, since
my Linux users usually share the same uid. I tested it some minutes ago.

However, I add a group freebsd (1001) to a Linux and chown/chmod most of
the pass without -R option and for the mail directory I used the -R
option, now everything _should_ work ...

$ ls -hAl /mnt
drwxrwx---  21 1000  rocketmouse   4.0k Oct 28 19:11 archlinux

but at the end of the pass I noticed this:

$ ls -hAl /mnt/archlinux/home/spinymouse/.local/share/evolution/mail
total 28
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:37
1323712251.1853.2@archlinux
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353406324.3645.4@q
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353606434.360.4@q
drwx--   2 1000  1000  4.0k Jan 24 02:37
1358783158.2173.1@precise
drwxrwx---  17 1000  rocketmouse   4.0k Jan 24 02:37 local
drwxrwx---   4 1000  rocketmouse   4.0k Jan 24 02:10 trash
drwxrwx---   2 1000  rocketmouse   4.0k Jan 24 02:37 vfolder

I suspect I write-accessed /1358783158.2173.1@precise with a Linux that
has no group 1001?

I'll add a group or user 1001 to all Linux and I'll add a user or group
1000 to FreeBSD.

If I've done that, could I expect still any issues?

Regards
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
"freebsd-questions-unsubscr...@freebsd.org"


If you're primarily using Linux and toying with FreeBSD, I'd just change 
your uid and gid to match what you use on linux.  If your Linux uid is 
1000 and your FreeBSD uid is 1001 you'll always have a problem.


Your best bet it to open up and edit /etc/passwd, /etc/master.passwd, 
and /etc/group and change all the 1001's to 1000.  You should be safe 
since the uid is so high.  Some programs expect certain things to be a 
certain uid, but you should be safe with 1000.  You'll have to remember 
to chown all the files.  Files are stored by the number, the name's for 
human.  I assume running these two commands should do it.


find / -uid 1001 -exec chown 1000 '{}' \;
find / -gid 1001 -exec chown :1000 '{}' \;
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Fwd: Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Ralf Mardorf
I was surpriesed, when Evolution from Linux had no permissions anymore to  
access the mail folder, after

drwxrwx--- rocketmouse  wheel was stable for FreeBSD

I wasn't aware, that even between Linux only, the folders for mount points  
share the same permissions, once the partition is mounted, since my Linux  
users usually share the same uid. I tested it some minutes ago.


However, I add a group freebsd (1001) to a Linux and chown/chmod most of  
the pass without -R option and for the mail directory I used the -R  
option, now everything _should_ work ...


$ ls -hAl /mnt
drwxrwx---  21 1000  rocketmouse   4.0k Oct 28 19:11 archlinux

but at the end of the pass I noticed this:

$ ls -hAl /mnt/archlinux/home/spinymouse/.local/share/evolution/mail
total 28
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:37  
1323712251.1853.2@archlinux

drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353406324.3645.4@q
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353606434.360.4@q
drwx--   2 1000  1000  4.0k Jan 24 02:37  
1358783158.2173.1@precise

drwxrwx---  17 1000  rocketmouse   4.0k Jan 24 02:37 local
drwxrwx---   4 1000  rocketmouse   4.0k Jan 24 02:10 trash
drwxrwx---   2 1000  rocketmouse   4.0k Jan 24 02:37 vfolder

I suspect I write-accessed /1358783158.2173.1@precise with a Linux that  
has no group 1001?


I'll add a group or user 1001 to all Linux and I'll add a user or group  
1000 to FreeBSD.


If I've done that, could I expect still any issues?

Regards
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-22 Thread Ralf Mardorf

Hi :)

perhaps good news for me.

That's strange. Now user and group are kept for the mount point of the  
ext3 fs. Can I assume that this usually should work and that I just had  
bad luck, when permissions, user and group were automatically changed?


root@freebsd:/mnt # ls -l
drwxrwx---  21 1000  1000   4096 Oct 28 19:11 archlinux
drwxrwxrwx   2 root  wheel  4096 Jan 22 07:09 dump

root@freebsd:/mnt # chown rocketmouse:wheel archlinux

root@freebsd:/mnt # ls -l
drwxrwx---  21 rocketmouse  wheel  4096 Oct 28 19:11 archlinux
drwxrwxrwx   2 root wheel  4096 Jan 22 07:09 dump

root@freebsd:/mnt # shutdown -r now

root@freebsd:/mnt # ls -l
drwxrwx---  21 rocketmouse  wheel  4096 Oct 28 19:11 archlinux
drwxrwxrwx   2 root wheel  4096 Jan 22 07:09 dump

Before I continue with setting up Evolution, I'll take care about it for a  
few shutdowns and startups.


Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-22 Thread Ralf Mardorf

On Tue, 22 Jan 2013 11:26:18 +0100, Polytropon  wrote:


On Tue, 22 Jan 2013 04:16:42 -0600, Joshua Isom wrote:

On 1/21/2013 5:33 PM, Ralf Mardorf wrote:
> Hi :)
>
> I'm sharing the same directory for Evolution emails, by several Linux
> installs. For e.g. Ubuntu Precise it's Evolution 3.2.3 and for e.g.
> Ubuntu Quantal it's Evolution 3.6.0.
>
> I'm doing it by a link:
>

It looks like to me you're asking for long term trouble.  You're using
multiple versions, so in the future there could be changes that could
corrupt your mail.  Why not just use an IMAP server instead?  It's what
I do, so my mail's shared between FreeBSD, Windows, and Android.


That might be overhead, but still the approach contains
potential for future trouble, as you correctly pointed
out.

The reason is simple: While you may not have trouble if
all programs use the same mechanism for _storing_ mail
(e. g. in mbox, MH or Maildir format), they might store
other aspects of communication (read / unread, address
books, configuration settings) differently. This should
happen _independently_ of the mail storage. As long as
all involved programs are the same version, it will
probably work without any trouble. But if one program
of a newer version decides to rewrite the configuration
data in a new (and backwards-incompatible) format, the
older versions will definitely run into trouble.

I've been using a similar approach in the past, having
several GUI and TUI mail clients use the same mail
_storage_. Still as you suggest, running a (local) IMAP
server may prevent trouble, at least on the long run,
and it enables you easier testing for mail clients that
do not use the same storage format as your "old" ones do.
Still you can have any "storage backend" you like, so
even "plain text work" (easily done with MH and Maildir)
can be done if required (like grepping through messages
or processing them automatically in whatever manner).


I don't share configurations, filters etc. only the mails and it never did  
cause an issue. Read and unread always worked.


First I let Evolution restore all data from an Evolution backup, Evolution  
has gut an option to do it, so it will convert all configurations, filters  
etc., then I delete mail and only link "mail".


Doing this with e.g. Mozilla MUAs does cause issues, when they are from  
different versions, but it works flawlessly for Evolution. For older  
versions of Evolution it wasn't possible to backup and restore everything  
by an Evolution option, then we had to do a lot of manually work, even  
when not sharing a folder. Since this is fixed, sharing the mail folder  
always will work.


Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-22 Thread Ralf Mardorf

On Tue, 22 Jan 2013 11:16:42 +0100, Joshua Isom  wrote:
It looks like to me you're asking for long term trouble.  You're using  
multiple versions, so in the future there could be changes that could  
corrupt your mail.  Why not just use an IMAP server instead?  It's what  
I do, so my mail's shared between FreeBSD, Windows, and Android.


I'm doing it for a long time and I only link to the mail directory. I  
experienced IMAP as a PITA, not only that there would be the need to set  
up IMAP for each install, I only have one computer, it did cause  
incompatibilities, not seldom thousands of mails get fetched several  
times. Sync can cause tons of issues.


Keeping mails on the servers of the two providers I'm using (Alice and  
Rocketmail) is no option. I will fetch emails and delete them on their  
servers.


The only issue with sharing the GNOME email folder is, that GNOME 3 is a  
broken DE and Evolution 3.6 is buggy, but this also is an issue, if I  
don't share the email folder. Unfortunately the mail dir format can't be  
shared with other mail dir MUAs.


YMMV!

Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-22 Thread Joshua Isom
He already mentioned different major versions, and changing to 5.0 in a few 
years may need the mail "migrated" for a new feature.  Then there could be 
trouble.  Getting storage away from the client is the most stable.  A local 
cache will likely provide all the new fancy features.

Polytropon  wrote:

>On Tue, 22 Jan 2013 04:16:42 -0600, Joshua Isom wrote:
>> On 1/21/2013 5:33 PM, Ralf Mardorf wrote:
>> > Hi :)
>> >
>> > I'm sharing the same directory for Evolution emails, by several
>Linux
>> > installs. For e.g. Ubuntu Precise it's Evolution 3.2.3 and for e.g.
>> > Ubuntu Quantal it's Evolution 3.6.0.
>> >
>> > I'm doing it by a link:
>> >
>> 
>> It looks like to me you're asking for long term trouble.  You're
>using 
>> multiple versions, so in the future there could be changes that could
>
>> corrupt your mail.  Why not just use an IMAP server instead?  It's
>what 
>> I do, so my mail's shared between FreeBSD, Windows, and Android.
>
>That might be overhead, but still the approach contains
>potential for future trouble, as you correctly pointed
>out.
>
>The reason is simple: While you may not have trouble if
>all programs use the same mechanism for _storing_ mail
>(e. g. in mbox, MH or Maildir format), they might store
>other aspects of communication (read / unread, address
>books, configuration settings) differently. This should
>happen _independently_ of the mail storage. As long as
>all involved programs are the same version, it will
>probably work without any trouble. But if one program
>of a newer version decides to rewrite the configuration
>data in a new (and backwards-incompatible) format, the
>older versions will definitely run into trouble.
>
>I've been using a similar approach in the past, having
>several GUI and TUI mail clients use the same mail
>_storage_. Still as you suggest, running a (local) IMAP
>server may prevent trouble, at least on the long run,
>and it enables you easier testing for mail clients that
>do not use the same storage format as your "old" ones do.
>Still you can have any "storage backend" you like, so
>even "plain text work" (easily done with MH and Maildir)
>can be done if required (like grepping through messages
>or processing them automatically in whatever manner).
>
>
>
>
>-- 
>Polytropon
>Magdeburg, Germany
>Happy FreeBSD user since 4.0
>Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-22 Thread Chris Whitehouse

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.





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-22 Thread Polytropon
On Tue, 22 Jan 2013 04:16:42 -0600, Joshua Isom wrote:
> On 1/21/2013 5:33 PM, Ralf Mardorf wrote:
> > Hi :)
> >
> > I'm sharing the same directory for Evolution emails, by several Linux
> > installs. For e.g. Ubuntu Precise it's Evolution 3.2.3 and for e.g.
> > Ubuntu Quantal it's Evolution 3.6.0.
> >
> > I'm doing it by a link:
> >
> 
> It looks like to me you're asking for long term trouble.  You're using 
> multiple versions, so in the future there could be changes that could 
> corrupt your mail.  Why not just use an IMAP server instead?  It's what 
> I do, so my mail's shared between FreeBSD, Windows, and Android.

That might be overhead, but still the approach contains
potential for future trouble, as you correctly pointed
out.

The reason is simple: While you may not have trouble if
all programs use the same mechanism for _storing_ mail
(e. g. in mbox, MH or Maildir format), they might store
other aspects of communication (read / unread, address
books, configuration settings) differently. This should
happen _independently_ of the mail storage. As long as
all involved programs are the same version, it will
probably work without any trouble. But if one program
of a newer version decides to rewrite the configuration
data in a new (and backwards-incompatible) format, the
older versions will definitely run into trouble.

I've been using a similar approach in the past, having
several GUI and TUI mail clients use the same mail
_storage_. Still as you suggest, running a (local) IMAP
server may prevent trouble, at least on the long run,
and it enables you easier testing for mail clients that
do not use the same storage format as your "old" ones do.
Still you can have any "storage backend" you like, so
even "plain text work" (easily done with MH and Maildir)
can be done if required (like grepping through messages
or processing them automatically in whatever manner).




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-22 Thread Joshua Isom

On 1/21/2013 5:33 PM, Ralf Mardorf wrote:

Hi :)

I'm sharing the same directory for Evolution emails, by several Linux
installs. For e.g. Ubuntu Precise it's Evolution 3.2.3 and for e.g.
Ubuntu Quantal it's Evolution 3.6.0.

I'm doing it by a link:



It looks like to me you're asking for long term trouble.  You're using 
multiple versions, so in the future there could be changes that could 
corrupt your mail.  Why not just use an IMAP server instead?  It's what 
I do, so my mail's shared between FreeBSD, Windows, and Android.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-21 Thread Polytropon
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.

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.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-21 Thread Erich Dollansky
Hi,

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.
> 
> 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, this is what I would do.

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-21 Thread Ralf Mardorf
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.

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.

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-21 Thread Erich Dollansky
Hallo Ralf,

On Tue, 22 Jan 2013 01:53:52 +0100
Ralf Mardorf  wrote:

> On Tue, 2013-01-22 at 07:31 +0700, Erich Dollansky wrote:
> > On Tue, 22 Jan 2013 00:33:49 +0100
> > Ralf Mardorf  wrote:
> > 
> > > 
> > > root@freebsd:/usr/home/rocketmouse # ls -l /mnt
> > > drwxrwx---  21 1000  1000   4096 Oct 28 19:11 archlinux
> > > drwxrwxrwx   2 root  wheel  4096 Jan 20 20:09 dump
> > > 
> > it seems that you do not have a user with the id 1000 on this
> > machine. Create one and that user will be able to access it.
> 
> Hallo Erich :)
> 
> correct, as already mentioned, the uid of the FreeBSD user is 1001.
> Why doesn't change chown the user and group, why do I get ---? I'll
> try it again, perhaps it was voodoo ;).
> 
> Assumed it wasn't voodoo, is there no way to get consistent rwx
> permissions for "others" or to get a consistent group "wheel" instead
> of "1000"? Why do I get those permissions, owner and group
> automatically? And why does it differ to what I get for /dump?
> 
root and wheel have the ID 0. All other IDs are more or less randomly
used. I use scripts on my systems to have always the same IDs.

> 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.

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-21 Thread Ralf Mardorf
On Tue, 2013-01-22 at 07:31 +0700, Erich Dollansky wrote:
> On Tue, 22 Jan 2013 00:33:49 +0100
> Ralf Mardorf  wrote:
> 
> > 
> > root@freebsd:/usr/home/rocketmouse # ls -l /mnt
> > drwxrwx---  21 1000  1000   4096 Oct 28 19:11 archlinux
> > drwxrwxrwx   2 root  wheel  4096 Jan 20 20:09 dump
> > 
> it seems that you do not have a user with the id 1000 on this machine.
> Create one and that user will be able to access it.

Hallo Erich :)

correct, as already mentioned, the uid of the FreeBSD user is 1001. Why
doesn't change chown the user and group, why do I get ---? I'll try it
again, perhaps it was voodoo ;).

Assumed it wasn't voodoo, is there no way to get consistent rwx
permissions for "others" or to get a consistent group "wheel" instead of
"1000"? Why do I get those permissions, owner and group automatically?
And why does it differ to what I get for /dump?

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?

Ciao,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-21 Thread Erich Dollansky
Hi,

On Tue, 22 Jan 2013 00:33:49 +0100
Ralf Mardorf  wrote:

> 
> root@freebsd:/usr/home/rocketmouse # ls -l /mnt
> drwxrwx---  21 1000  1000   4096 Oct 28 19:11 archlinux
> drwxrwxrwx   2 root  wheel  4096 Jan 20 20:09 dump
> 
it seems that you do not have a user with the id 1000 on this machine.
Create one and that user will be able to access it.

Erich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Sharing a mail folder between Linux and FreeBSD

2013-01-21 Thread Ralf Mardorf
Hi :)

I'm sharing the same directory for Evolution emails, by several Linux
installs. For e.g. Ubuntu Precise it's Evolution 3.2.3 and for e.g.
Ubuntu Quantal it's Evolution 3.6.0.

I'm doing it by a link:

root@precise:~# ls -l /home/spinymouse/.local/share/evolution
lrwxrwxrwx 1 spinymouse spinymouse58 Apr 28  2012 mail
-> /mnt/archlinux/home/spinymouse/.local/share/evolution/mail

I would like to share it with Evolution from my FreeBSD install, but
there's an issue regarding to permissions.

For FreeBSD I don't have control about the permissions of the mounted
Linux ext3 partitions.

I get:

root@freebsd:/usr/home/rocketmouse # ls -l /mnt
drwxrwx---  21 1000  1000   4096 Oct 28 19:11 archlinux
drwxrwxrwx   2 root  wheel  4096 Jan 20 20:09 dump

The user is able to access /dump, but only /root can access /archlinux.
The uid of the FreeBSD user is 1001. I wonder why for /archlinux I get
rwxrwx--- and for /dump rwxrwxrwx, those permissions, user and group
will be changed automatically.

Regards,
Ralf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"