LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-23-2017, 09:42 AM   #1
samudrala1
LQ Newbie
 
Registered: May 2017
Posts: 5

Rep: Reputation: Disabled
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...

Any thoughts please...
 
Old 05-23-2017, 10:59 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,115

Rep: Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838
Quote:
Originally Posted by samudrala1 View Post
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.
 
1 members found this post helpful.
Old 05-23-2017, 03:46 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,772

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Hello and welcome to LQ.

Simple access to files via smb and file based permissions are pretty easy to use in Linux.

Setting up AD is a little bit more work. Using PKI is more again if you are going across domains.

Ubuntu is good. I may be tempted to look at CentOS or OpenSuse also before I got too far along.

Last edited by jefro; 05-24-2017 at 05:01 PM.
 
Old 05-23-2017, 03:49 PM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,309

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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.
 
Old 05-23-2017, 11:29 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I think you're going to be using Windows clients, so samba should work. Just set up the shares.
 
Old 05-24-2017, 02:43 AM   #6
samudrala1
LQ Newbie
 
Registered: May 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
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....
 
Old 05-24-2017, 07:03 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,115

Rep: Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838
Quote:
Originally Posted by samudrala1 View Post
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.
 
Old 05-25-2017, 06:17 AM   #8
samudrala1
LQ Newbie
 
Registered: May 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you @TB0ne for your suggestions. I am a newbie in linux. Do you have any sample script to do this?
 
Old 05-25-2017, 07:37 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,115

Rep: Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838
Quote:
Originally Posted by samudrala1 View Post
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.
 
Old 05-25-2017, 10:09 AM   #10
samudrala1
LQ Newbie
 
Registered: May 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
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.

Thank you in advance.
 
Old 05-25-2017, 10:22 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,115

Rep: Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838Reputation: 7838
Quote:
Originally Posted by samudrala1 View Post
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.
 
Old 05-26-2017, 10:32 AM   #12
samudrala1
LQ Newbie
 
Registered: May 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
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.
 
Old 05-26-2017, 10:50 AM   #13
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,813
Blog Entries: 13

Rep: Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875
Quote:
Originally Posted by samudrala1 View Post
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.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Samba File Server - Mapped Windows Drives Loose Connection ablundon Linux - Networking 5 12-30-2014 02:54 PM
LXer: Install and Configure Samba Server as File Server on Ubuntu Server 12.04 LXer Syndicated Linux News 0 06-06-2012 12:01 PM
generating tmp file in samba server while saving file from win7 in samba server centos123 Linux - Server 15 11-05-2011 05:05 AM
Upload >2GB file from windows to Linux Samba server DuckChang64 Linux - Server 3 03-23-2008 12:02 AM
LXer: HowTo: Ubuntu File- And Print Server For Windows Workgroups (Samba Domain Controller) LXer Syndicated Linux News 0 01-08-2006 09:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration