Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: what i would like to do with ubuntu server - need pointers

  1. #1
    Join Date
    Aug 2019
    Beans
    9

    what i would like to do with ubuntu server - need pointers

    All,

    absolute newbie here. I have installed 19.04 server on an older desktop with the intention of using it as a file server for my windows computers. win 10 is being a pain about networking and seeing attached computers on the network. I have an 8 drive disk box attached via usb3.0 to a windows computer. I want to take that 8 drive box and attach it to the ubuntu server desktop and have access to all disks/partitions via windows on all my other computers (only on my home network, not across the internet).

    I installed FTP and NFS on unbutu. but I have no idea where to go from here. if someone could point me to books, youtube tutorials or just provide direction, it would be appreciated.

    thanks
    john w zerkel

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    17,144
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: what i would like to do with ubuntu server - need pointers

    Lots of opinions follow. Hopefully, some other people will chime in with theirs so you can pick and choose the different parts that make the most sense.

    First, as someone new, you don't want 19.04. Support for that release ends in December. You want 18.04, which has 5 yrs of standard support - 2023. Stay with LTS releases for servers unless you have a very specific requirement. Newer isn't always better. 18.04 and 16.04 are LTS releases. Most of my systems are on 16.04, which has free standard support until April of 2021.

    Second, Linux uses different file systems than Windows. While it can read NTFS storage, there are multiple problems doing that since it doesn't natively support it. Performance will be less, standard Unix permissions aren't honored, and server-style storage management cannot be used. So you have to decide how you will either migrate to a Linux storage solution software stack or live with all the issues that using NTFS forced onto the server.

    USB3 doesn't implement the full ATA storage command set, so there are some things that USB (any sort) can cause. Often, these USB storage boxes also support eSATA. It would definitely be worth the effort to use eSATA over USB3.

    To make Linux storage available to Windows, you'll likely want to use samba. It is the least bad of the bad choices. You can use sftp, scp, sshfs, NFSv3, NFSv4 and a number of other protocols if you like a little more challenge. Samba is an SMB implementation, so it doesn't fully support Unix permissions. Samba/SMB is only useful on secured LAN networks. If you want to access files securely over the internet, there are other methods, like sftp. sftp support is built into almost every Linux file manager. On Windows, WinSCP is a nice client. There are sftp clients for every networked OS, like iOS, OSX, Android, Windows and all the different Unix/BSD flavors.

    Please don't use plain FTP. That protocol should have died in 1995. I'm 100% serious. Use sftp instead. ssh and ssh-based protocols are the way that Unix people communicate with Unix systems. It is the swiss-army-knife of Unix connectivity. Putty is the normal ssh client used by Windows. Please uninstall/remove/purge whatever plain FTP server you installed.

    To install sftp, just install and secure ssh.
    Code:
    sudo apt install openssh-server fail2ban
    That's it. It will be enabled and running now. You can connect using sftp, scp, ssh, rsync, and 50 other tools with that single line. Learn about ssh.
    What is that "fail2ban" thing? It is a brute-force attack countermeasure, setup to automatically block brute force attacks against ssh, sftp, scp and all the ssh-based tools. I don't remember the number of attempts allowed, but either 3 of 5 is the default before a firewall rule will block the attacking IP for 5 minutes. Really, if you care about security, you won't allow passwords to be used. ssh-keys are much more secure AND 50,000x more convenient.

    As for doing server things, google for "ubuntu server guide" and check out the results that have "ubuntu" in the name. The problem with online resources is they say what to type, but do not provide "why" or "why not" to do those things.

    A few more tips. When googling for anything with your new Ubuntu Server - assuming you've moved to 18.04, then you should seek out solutions specific to 18.04. Most server things don't change too rapidly, but there are many old how-to guides out there full of instructions that simply don't work for 18.04. If you haven't figure this out, Linux servers don't have any GUI. Generally, I manage my Unix servers through ssh, scripting, and automation tools. For servers that are the same, I can manage 1, 5, 20, 200, 2000 servers with about the same level of effort. That's why Unix/Linux servers are so much more popular than, other options.

    But really, you need to get your storage and logical volume management design figured out carefully before going too far beyond ssh on the box.

    If you will post a little about your system - inxi -Fz - would be good, we could suggest some other considerations for your new 18.04 server. Just install inxi since it isn't likely to be installed. Getting the overview upfront will prevent misunderstandings.

  3. #3
    Join Date
    Aug 2019
    Beans
    9

    Re: what i would like to do with ubuntu server - need pointers

    thank you. the storage box does offer eSATA but it only supports 6 of 8 drives on it. That's why I chose USB3.0. also, all drives/partitions are currently formatted as NTFS. I will wipe and install 18.04 along with ssh and inxi. I will post again upon completion with the output from inxi. i'll also include specs on the drive box as well as the current drives installed.

    thanks so very much.
    john

  4. #4
    Join Date
    Aug 2019
    Beans
    9

    Re: what i would like to do with ubuntu server - need pointers

    the 8-bay removable enclosure is StarTech.com's S358BU33ERM unit. usb3.0/eSATA interfaces. attached is the screen shot of the inxi display.
    Attached Images Attached Images

  5. #5
    Join Date
    Aug 2019
    Beans
    9

    Re: what i would like to do with ubuntu server - need pointers

    this is a picture of my StarTech drive configuration showing drives/partitions.

    john
    Attached Images Attached Images

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    17,144
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: what i would like to do with ubuntu server - need pointers

    Dude, no screen shots. Copy/paste the text, please. Use code tags. See my signature for how - it redirects to a guide in these forums.

    This isn't Windows and we always prefer text over images. ALWAYS, especially for servers. Many people here pay for bandwidth by the byte and I have terrible eyesight, so images just don't work for me. I can't copy/paste a line from an image with corrections either ... so I'll just not help.

    If you are running putty from Windows, the copy/paste is all mouse controlled and really easy. Left to select, right to paste.
    If you are doing it on a Linux workstation, if there is a GUI, it is select/paste using the mouse (left to select, middle to paste) or you can redirect the program output into a file.
    Code:
    inxi -Fz > /tmp/summary
    and move the file to whatever machine has the web browser (using sftp?), then copy/paste.

    https://github.com/jlevy/the-art-of-command-line is an nice introduction to using bash that goes beyond the trivial stuff. Grab what you need and come back for most stuff later. Mainly, if you are typing more than 2-3 characters at a time on any Unix machine, it is likely you are doing it the hard way. Learn about bash completion, also called "tab completion" since shells other than bash provide it too.

  7. #7
    Join Date
    Dec 2009
    Beans
    6,238

    Re: what i would like to do with ubuntu server - need pointers

    As it turns out I just set up a Ubuntu server 2 days ago so I'll share what I did.

    [1] Samba is the default file sharing mechanism on all desktop operating systems so I started with that:
    Code:
    sudo apt install samba
    [2] I wanted the server to be "discoverable" through the file managers of all my Linux and MacOS clients so I installed avahi:
    Code:
    sudo apt install avahi-daemon
    Note: Once avahi is installed samba will announce its presence automatically and will be seen by any Linux or MacOS desktop system.

    [3] I wanted the server to be discoverable through Explorer on Win10.

    As you may have discovered yourself Win10 has a problem "seeing" other hosts on the network. The normal NetBIOS mechanism which allowed host discovery no longer works in Win10 because it disabled SMBv1 on the client side ( as well as the server side ) and you can't browse the network without SMBv1. You can connect to by name ( maybe ) but you can't browse for it.

    You can still access the server through Explorer but it must be asked for explicitly by either:

    ip address
    : \\192.168.0.100
    OR
    mDNS name: \\zerkelserver.local

    OR by NetBIOS name - if your're lucky: \\zerkelserver

    There is another way Win10 can discover the samba server. In my particular case and since the Win10 machines are somewhat transient in my universe I decided to implement WS-Discovery on the server using the steps in this feature request: https://bugs.launchpad.net/ubuntu/+s...a/+bug/1831441

    Now the only thing left is to create a samba share. In my case I just created a Public guest accessible share to make sure everything works by editing /etc/samba/smb.conf and adding a share definition at the end on the file:

    Code:
    [Public]
    path = /srv/Public
    guest ok = yes
    read only = no
    force user = morbius
    Then restarted smbd:
    Code:
    sudo service smbd restart
    Note: I had to create the /srv/Public path ( sudo mkdir -p /srv/Public ) and take possession of the folder ( sudo chown morbius /srv/Public )

    I think it would help people if you could describe your use case for this server. What is it going to be used for? Do you want everything to be accessible to everyone? etc.....

    I suspect your biggest hurdle will be to mount these 8 USB "drives". Ubuntu server doesn't automount USB devices so you will have to define them.



  8. #8
    Join Date
    Aug 2019
    Beans
    9

    Re: what i would like to do with ubuntu server - need pointers

    Morbius1, Thank you for your very helpful post. Can you please elaborate on your very last statement about my biggest hurdle? please keep in mind that i'm a windows person JUST STARTING to look into Linux as a server for some storage. I'm trying to get these disks available to all my win 10 machines via explorer WITHOUT having to map network drives explicitly. my goal is to have all drives/partitions on the disk enclosure available to all my computers. main use will be backup and file storage. I have ordered 3 books on Ubuntu v18.04 covering server and workstation versions.

    TheFu, as noted in my first post, i'm a 3 day old user of ubuntu, coming from a windows world. I don't know how to do the most basic things like copy/paste/transfer between the ubuntu machine and my windows machine (never heard of 'putty'). so i'm sorry to have offended you with the screen shots. I will understand if you don't want to deal with an absolute beginner.

    thanks
    john

  9. #9
    Join Date
    Aug 2019
    Beans
    9

    Re: what i would like to do with ubuntu server - need pointers

    also, during the server installation, it asked if I wanted SSH installed and I said yes. is that the same as openssh or do I need both or do I need to reinstall the server without ssh and add openssh?

    thanks
    john

  10. #10
    Join Date
    Dec 2009
    Beans
    6,238

    Re: what i would like to do with ubuntu server - need pointers

    I'm going to answer the easy one first if that is OK.

    When you installed SSH on the server you installed the client and server components so you should be good to go.

    If your client is Win10 you already have an ssh client built into the system - in fact it's the same OpenSSH that Linux uses just a newer version. However unlike a Linux client that has it implemented in the file manager in Win10 it's only accessible via the terminal ... er ... CommandPrompt.

    So the initial connection process would look something like this - my user on the server is tester and the hostname is ubsrv1804:
    Microsoft Windows [Version 10.0.18362.10005]
    (c) 2019 Microsoft Corporation. All rights reserved.

    C:\Users\morbius>ssh tester@ubsrv1804.local
    You will get a warning about accepting a key
    The authenticity of host 'ubsrv1804.local (2605:a601:a1a2:4e00:216:76ff:fea6:1745)' can't be established.
    ECDSA key fingerprint is SHA256:VLwguAbPFc9BACFzqTEdBWiZL1BH637nY8j3yllat9E .
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'ubsrv1804.local,2605:a601:a1a2:4e00:216:76ff:fea6 :1745' (ECDSA) to the list of known hosts.
    Then it will ask for the server users password:
    tester@ubsrv1804.local's password:
    At that point you are remotely connecting to the server:
    Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-55-generic x86_64)
    ...
    ...
    ...
    tester@ubsrv1804:~$
    This may not be the way you actually want to copy files around your network but you might consider using it to administer the server or when someone asks you to run some command and post the results you can do it from Win10 and copy and paste it to the forum.

    Given the requirement to have everything in Explorer I'm not sure if there is an alternative to Samba and the WS-Discovery idea unless you want to enable SMBv1 on the client side of Win10. Microsoft has been trying to kill off SMB1 and the whole NetBIOS / Workgroup thing for 20 years and it really doesn't want anyone to use smb1.
    Last edited by Morbius1; 2 Weeks Ago at 03:53 PM.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •