Migration of users

We are about to get a new server and I need to prepare for migration to the new one. This will be my first migration so I'm sure I will be learning alot.
My current server is running CentOS 4.x and I want to move to a sever running Centos 5.x , thought it would make things easier.
The old server is also running Blue Quartz as the backend control panel and the new server will have Cpanel.
So is there a script or program I could run that would move users over to the new server? preserving mbox and passwords? or is there another way to do it?

Thanks!

Are you moving users from one server to another, or simply upgrading the packages on the existing server?

Concerning passwords, there is no difference between shadow files between 4.x and 5.x.

Concerning mbox -- this is the default UNIX mailbox format. If you are intending to use IMAP or some sort of webmail, it's best to keep the mbox format first, then separately migrate the mail system. However, out of the box, I doubt the CentOS distribution will change mail formats on you.

Concerning Blue Quarts/Cpanel -- I have no idea.

The only thing to watch out for is that sometimes the user id's in the /etc/passwd files change. I'm talking the lower id's -- under 500. If you have any real users with user-id's less than 200, be careful. The same goes for groups (/etc/group) you have created.