Migrate existing Windows File Server to Linux(Ubuntu Samba) File Server
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Migrate existing Windows File Server to Linux(Ubuntu Samba) File Server
I have a Windows Server 2012 running as a File Server. Now I am planning to migrate File Server to Linux which is running on Ubuntu 16.04.2. I have installed Samba...
I have a Windows Server 2012 running as a File Server. Now I am planning to migrate File Server to Linux which is running on Ubuntu 16.04.2. I have installed Samba... Any thoughts please...
Sure...configure Samba to run as your server.
Seriously, based on this, what do you think we'll be able to tell you? You don't say whether or not you want Active Directory, how many users, what you've done/tried, what problem(s) you're having, etc. All you've told us is "I have installed Samba on an Ubunt 16.04 server". So..proceed; configure Samba, and let us know if you have actual problems/questions related to that.
if you are migrating from windows to linux does that mean you no longer need to use windows machines. if thats the case i wouldnt use samba but just use the ssh server and install sshfs on all my clients.
Thank you everyone for their replies. I have joined Linux to Active Directory. Able to create shares and get authenticated against active directory.
As far as I know about a File Server in Linux, we need to give directory permissions and write share set in smb.conf
Now when I migrate data from Windows File Server to Linux, I am able to migrate using -p(preserving permissions, ownership and timestamp). But how can I write respective directory share in smb.conf dynamically. Because, it will be difficult to prepare list of shares and its permissions in Windows and create in Linux file server manually.
Thank you everyone for their replies. I have joined Linux to Active Directory. Able to create shares and get authenticated against active directory.
As far as I know about a File Server in Linux, we need to give directory permissions and write share set in smb.conf
Now when I migrate data from Windows File Server to Linux, I am able to migrate using -p(preserving permissions, ownership and timestamp). But how can I write respective directory share in smb.conf dynamically. Because, it will be difficult to prepare list of shares and its permissions in Windows and create in Linux file server manually.
Please let me know how to achieve this....
You do not. You migrate them one at a time, but honestly this really isn't as big of a job as you may think it is. Each of these will have one section in smb.conf
Your users home (private) shares all get the same permissions, just different owners, created when you create the local user on the Samba server.
Group shares are simple; create a group in Linux and make the appropriate users members of that group. The Samba share then is owned by that group.
Public shares? Trivial...wide open permissions for any users.
So even if you have 1,000 different groups with 2,000 users, you can easily export a list from Windows, and a small Linux script can create the groups/users (and even the basic smb.conf sections, if you wish), automatically. But chances are you don't have that many...so doing a careful migration will get you better results.
Thank you @TB0ne for your suggestions. I am a newbie in linux. Do you have any sample script to do this?
No. There are thousands of easily-found script examples you can find with a Google search, and any script will have to be modified by you, to fit your needs. We're happy to help you with a script, but the first step in getting that help is you posting what you have written/done/tried on your own.
No. There are thousands of easily-found script examples you can find with a Google search, and any script will have to be modified by you, to fit your needs. We're happy to help you with a script, but the first step in getting that help is you posting what you have written/done/tried on your own.
Unfortunately, I am unable to find any relevant script. Please let me know if you see any script by chance.
Unfortunately, I am unable to find any relevant script. Please let me know if you see any script by chance.
Sorry, no. Again, YOU, PERSONALLY are going to have to put effort into writing your own scripts. I have MANY scripts, but as said previously, ANYTHING is going to have to be heavily modified to suit your needs, and we're not going to do this for you.
There is a bash scripting tutorial in my posting signature; tens of thousands more script examples can be found with a simple Google search. I absolutely DO NOT believe you can't find ANY scripts, at all, that would help get you started. Either write something yourself or modify something you've found, and post it (along with where you're stuck, and what error(s) you get), and we'll help you, or hire someone to write your scripts for you.
Sorry, no. Again, YOU, PERSONALLY are going to have to put effort into writing your own scripts. I have MANY scripts, but as said previously, ANYTHING is going to have to be heavily modified to suit your needs, and we're not going to do this for you.
There is a bash scripting tutorial in my posting signature; tens of thousands more script examples can be found with a simple Google search. I absolutely DO NOT believe you can't find ANY scripts, at all, that would help get you started. Either write something yourself or modify something you've found, and post it (along with where you're stuck, and what error(s) you get), and we'll help you, or hire someone to write your scripts for you.
I just did manual process to achieve this. Now I started writing a script and will complete in couple of days. Thanks.
I just did manual process to achieve this. Now I started writing a script and will complete in couple of days. Thanks.
Hi samudrala1,
My most favorite comment is, "Whatever you can type in the command line typing, you can write into a BASH script."
After all, a BASH script is merely the automation of commands that you use on the command line.
Please see the references provided by TB0ne, and I also have a BASH Script Blog for Dummies and Geniuses which helps with debugging scripts and ideas for simple script actions which may help you.
If you code something and would like comments for enhancements or if you have difficulties with debugging your script, please post it and people can offer feedback towards how to make it a better, or correct script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.