From owner-freebsd-questions Sun Jan 9 8:47:48 2000 Delivered-To: freebsd-questions@freebsd.org Received: from web1906.mail.yahoo.com (web1906.mail.yahoo.com [128.11.23.67]) by hub.freebsd.org (Postfix) with SMTP id D50A815318 for ; Sun, 9 Jan 2000 08:47:43 -0800 (PST) (envelope-from manhtho@yahoo.com) Received: (qmail 4145 invoked by uid 60001); 9 Jan 2000 16:47:40 -0000 Message-ID: <20000109164740.4144.qmail@web1906.mail.yahoo.com> Received: from [202.167.121.197] by web1906.mail.yahoo.com; Sun, 09 Jan 2000 08:47:40 PST Date: Sun, 9 Jan 2000 08:47:40 -0800 (PST) From: Nguyen Manh Tho Subject: How can recognize the system and user account if you do not the system administrator ? To: freebsd-questions@freebsd.org Cc: nmtho@dit.hcmut.edu.vn MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear Sirs and Madams on Free BSD question list, I am trying to convert all the accounts and data of mail system from Turbo Linux to Free BSD Server, but I still stack on this problem. I need all your help and greatly appreciate them. From Mr. Gianmarco Giovannelli's answer in last recent day, I know that I have to do the following step: 1. Import the Linux passwd file to Free BSD format. I can not find the script that help me does this work (the awk script as Mr Dan Nelson's answer). If you have this script, please send it to me. Will I copy the Linux passwd file to Free BSD directory and run this script on this passwd to convert them to Free BSD format? 2. Copy all the users in the passwin from Turbo Linux to Free BSD and leave unchanged the system users in the Free BSD. I do not know how to recognize the normal users and the system ones. Do system users have the userid below 100 or 1000 ? Is there anything sign to recognize between them ? I also do not know if I will copy all the user on Linux passwd file to the Free BSD passwd file or not? 3. Copy all the group in /etc/group from Turbo Linux to Free BSD (but add only the users groups not the system ones) I am not the Sys Admin of this Linux Server and also very new with the Free BSD server so I do not know which group belong to users and which group is system group ? Is there anything sign to recognize between them ? 4. Copy all the aliases in /etc/aliases from Turbo Linux to Free BSD (add only the aliases pertinent to the users) I aslo do not know how to recognize the user aliases. 5. Copy all old mail from Linux to Free BSD. I can do this step. 6. Change the owner (user:group) to the files. #!/usr/bin/perl foreach $file (<*>) { ($uid)=(getpwnam($file))[2]; ($grp)=(getpwnam($file))[3]; chown($uid,$grp,$file); }; As I understand from this script, it will get the user_id and group of the mail file from the system to the vaiables $uid and $grp and after that assign them to this file by the procedure chown($uid,$grp,$file). Why I have to change user:group to the files that also have available in the Free BSD system???? Each user has one mail file, will all files contain on the directory that can be accessed by the root ? If not, how can I change the suitable owner for all the mail files ? The last question here is could I do all the above steps by the Perl script ? If you have, please send me the sample one as referrence. Please answer step by step, command by command if you could. I am sorry because I am very new and not experience on the Unix system (My field is database and information system) but I have to do this work for my University. It's very urgent, so if my silly question trouble you, please forgive me. Please answering me both 2 address bellow: nmtho@dit.hcmut.edu.vn manhtho@yahoo.com (I still can not send to the list from my University mail address although can get all mail from this list) Thank you very much for all relplies,I am looking forward to them. Have a good date. Nguyen Manh Tho Engineer, Assistant lecturer, Database Group, Department of Information technology, Hochiminh City University of Technology, Hochiminh City, Vietnam. __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message