Raspberry pi windows server

2022-09-14

Can you run Windows Server on a Raspberry Pi?

Make sure your Raspberry Pi supports 64-bit installations. My Pi is a 32-bit machine. You cannot Windows Sever 2019 does not support ARM hardware. What you want is impossible.

Is Raspberry Pi suitable for server?

Yes, you can run pretty much any type of server on a Raspberry Pi.

Can you install Windows on Raspberry Pi 4?

According to Microsoft, the only operating system for Raspberry Pi is an old version of Windows 10 IoT Core, which allows you to execute Visual Studio code on the computer, but it can’t work as a personal OS with a GUI. That is to say, there is still no way to directly install Windows on Raspberry Pi.

Is Raspberry Pi 4 good for servers?

In short, you will have complete control over your Minecraft server. As Raspberry Pi 4 is a low-cost single-board computer, building a Minecraft server with a Raspberry Pi 4 system can be very cost-effective. Raspberry Pi 4 is also a low-power device. You will not have to worry about electricity bills.

Can I run Windows XP on a Raspberry Pi 4?

TL;DR Yes it is possible to virtualize Windows XP on an ARM device such as Raspberry Pi.

Can a PI zero run a web server?

Re: Best web server OS for RPi Zero W They may be a little heavy for a simple home server, but there are lots of examples of how to use them and the basic set up is simple. A Pi Zero should be able to handle the load. I’ve run it on much less. The MariaDB (MySQL) server will likely be the memory hog.

Can Raspberry Pi replace desktop?

With programming, everything is quite good. Of course, the Raspberry Pi can’t replace most professional desktops, but in general, it can run almost all programming languages and frameworks, from Python to Fortran.

Can Raspberry Pi run 24 7?

Raspberry Pi can handle 24/7 run time. They are designed to be run for long periods of time without any failures occurring. There is, however, a catch. If you’d like to leave your Raspberry Pi on all the time without damaging it, it needs to be used with a proper linear power supply.

How much RAM does a Raspberry Pi 4 have?

The Raspberry Pi 4 is the first model to offer different amounts of RAM. You can choose 1GB, 2GB, or 4GB depending on how much you’ll need to do the things you plan on doing, and naturally, each tier has its own price ranging from about $35-50.

Introduction: Installing Windows Remote Desktop Server (RDP) on Your Raspberry Pi

Sometimes its not practical to have a monitor and keyboard attached to your Raspberry PI.

This is a quick guide to setting up your PI to allow windows to use Remote Desktop to connect to your PI

This guide is the result of the Bloominglabs Raspberry Pi and Adafruit Build Nights.

Step 1: What Is Needed:

A Raspberry Pi (any version should work)

Ethernet cable or WIFI adapter to connect to your network

Keyboard, Video Monitor, and Mouse to setup the software

A computer running Windows used to connect to your Raspberry Pi

Step 2: Installing XRDP Server

Open LXTerminal.

enter «sudo apt-get update» to get the most current list of packages

enter «sudo apt-get install xrdp» to install the server

enter «sudo reboot» to restart your system

XRDP will now automatically run whenever your Raspberry Pi is running.

Step 3: Find Your IP

Open LXterminal on your Raspberry Pi

Type «ifconfig»

The green line shows where to find your IP address. Write this down and save it for later.

(The red line is to hide the MAC address on the Pi I was using for the demo)

Step 4: Connect to Your Raspberry Pi

In Windows, open the Remote Desktop Client.

You will find it under:

Start Menu -> All Programs -> Accessories -> Remote Desktop Connection.

Enter the IP address from the previous step.

Step 5: Login to Your Raspberry Pi

Enter your username and password as you normally would.

After a brief loading window, you will have your Raspberry Pi desktop just as if you were in front of it with a monitor and keyboard.

How2SetUp a Raspberry Pi Windows NAS storage server — SQUEEZE

One of a set of simple easy to use guides for beginners to set up a Raspberry Pi computer.

Ok this instruction sheet will allow you to setup a Raspberry Pi computer to act as a (NAS)Network
Addressed Storage server so it will be possible for you to access files from any/all your
windows PC’s in your house using the Raspberry Pi to share the files on a disk drive attached
to one of the usb ports on the Raspberry Pi.

1. Firstly I need remote access to my pi so firstly carry out the
How2SetUp Remote Access from the menu on the left.

Lets connect to the Pi remotely using putty so we get the following screen.

Login using the default user pi and the default password raspberry.

2. Now lets make sure all the system updates from Debian have been applied

pi@raspberrypi~$ sudo apt-get update
lots of stuff will fly up the screen so wait until finished,
then repeat until nothing else updates — agree y to any y/n questions.

Probably a reboot is a good idea at this time so

pi@raspberrypi~$ sudo reboot

NOTE:- The disk drives that I will be attaching will be formatted in windows
format — either FAT32 or NTFS, I suggest you do this with a Windows PC and check the
drives are readable by the PC before attaching to the Pi, and also add a test file
so that you can see this while testing. You can use unix formatted drives but the
FAT/NTFS file systems will make the drives portable in case of a Pi failure.

3. Attach the disk drive or drives to the Raspberry Pi then type

pi@raspberrypi~$ sudo fdisk -l
This will show all the details of the attached disks even if you are not yet using or are able
to access them.

I have attached a powered 1Tb disk drive and a 400Mb usb card as examples, so the important
bits from the command is shown below — i have left out stuff not relevent for this How2SetUp.

——————————————————
Disk /dev/mmcblk0: 3965 MB, 3965190144 bytes
        Device Boot Start End Blocks Id System
/dev/mmcblk0p1 17 1216 76800 c W95 FAT32 (LBA)
/dev/mmcblk0p2 1233 26672 1628160 83 Linux
/dev/mmcblk0p3 26689 29744 195584 82 Linux swap / Solaris

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 7 HPFS/NTFS

Disk /dev/sdb: 4005 MB, 4005560320 bytes
   Device Boot Start End Blocks Id System
/dev/sdb1 1 486 3903763+ b W95 FAT32
——————————————————

From the above listing you can see that I have a disk /dev/mmcblk0 (the SD Card) which
contains 3 partitions — so this is the operating system disk.

I also have /dev/sda which is a Terabyte drive which has one partition and has been
formatted in HPFS/NTFS windows NT disk format(used by Windows NT,2000,XP,Vista,Windows 7 etc).

Finally I have a disk /dev/sdb that is a 4Gb usb card with 1 partition but this time its
been formatted in a windows FAT32 format — old style formatted.

All the disk drives and partitions attached to the Pi are shown, they are all given a
device address such as /dev/sda with a partiton 1 so /dev/sda1 is the disk in the first
Pi usb port and is partition 1.

4. Now we need to make the disks available to the operating system so we need to create a point
in the filesystem to mount the disks on.

To do this we need to create a directory that the disk can be attached to, so in the
example below we will use /mnt/disk1 for the 1st Disk and /mnt/disk2 for the second.

pi@raspberrypi~$ sudo mkdir /mnt/disk1
pi@raspberrypi~$ sudo mkdir /mnt/disk2
The above commands have made 2 new directories for us to use.

To test they exist type

pi@raspberrypi~$ ls /mnt
it should show the following if all is ok

——————————————————
disk1
disk2
——————————————————

5. Now we need to attach the disks to these folders so we have to edit the /etc/fstab file
that is used my the operating system on bootup to connect the physical disks to the
filesystem.
pi@raspberrypi~$ sudo vi /etc/fstab
This will show the following

——————————————————
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 0
#/dev/mmcblk0p3 none swap sw 0 0
——————————————————

We need to add the bottom 2 lines for the 2 disk drives, please note that the
entry vfat or ntfs-3g is dependant on your disk type and should be modified
accordingly.
If you have only attached one device only create the relevent entry for that disk.

——————————————————
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 0
#/dev/mmcblk0p3 none swap sw 0 0
/dev/sda1 /mnt/disk1 ntfs-3g defaults 0 0
/dev/sdb1 /mnt/disk2 vfat defaults 0 0
——————————————————

To make the files visible to the filesystem type
pi@raspberrypi~$ sudo mount -a
This will try to mount the new devices into /mnt/disk1 and /mnt/disk2 — so to test if
it has worked type
pi@raspberrypi~$ ls /mnt/disk1
This should now list any files on the disk that you have put there. If this is not the case
then check that the disk types are correct in /etc/fstab

6. Now we need to install a software package called samba which will allow a unix box to share windows
files.

pi@raspberrypi~$ sudo apt-get install samba
Wait while stuff flies up the screen and type y at any yes/no prompts
Depending on the Distro you are using you may need to install this, so do it anyway.
pi@raspberrypi~$ sudo apt-get install samba-common-bin

7. When all is complete then the samba package has been installed so will need configuring
for your setup, so you will need to edit the /etc/samba/smb.conf file.

pi@raspberrypi~$ sudo vi /etc/samba/smb.conf
The things that possibly need changing are the workgroup entry set to WORKGROUP for XP and
previous operating systems and HOME for Windows 7 and above (not sure what is the default for Vista).

Then i would comment out the following lines by adding a ; to the front of the item as this makes
initial setup and testing easier.

——————————————————
;[homes]
; comment = Home Directories
; browseable = no
;[printers]
; comment = All Printers
; browseable = no
; path = /var/spool/samba
; printable = yes
; guest ok = no
; read only = yes
; create mask = 0700
;[print$]
; comment = Printer Drivers
; path = /var/lib/samba/printers
; browseable = yes
; read only = yes
; guest ok = no
;[cdrom]
; comment = Samba server’s CD-ROM
; read only = yes
; locking = no
; path = /cdrom
; guest ok = yes
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom
——————————————————

Then finally at the end add your windows share name — i will use a share name of usb and
will share out the content of /mnt/disk1 — to share the other disk, add another entry
as below with the share name within the [ ] and the path to the other disk drive.

——————————————————
[usb]
comment = USB Share
path = /mnt/disk1
writeable = Yes
only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes
——————————————————

8. At last we can restart samba and test the configuration so to restart samba.
pi@raspberrypi~$ sudo service samba restart
and to check the shares and configuration run
pi@raspberrypi~$ sudo testparm -s
this should show something similar to that below

——————————————————
Load smb config files from /etc/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Processing section «[usb]»
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
server string = %h server
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
wins support = Yes
panic action = /usr/share/samba/panic-action %d

[usb]
comment = USB Share
path = /mnt/disk1
read only = No
create mask = 0777
directory mask = 0777
guest only = Yes
guest ok = Yes
——————————————————

If you get the above info then you need to add the pi user to the samba user database
which is not the same as the pi username/password but can be so
pi@raspberrypi~$ sudo smbpasswd -a pi
This will add a pi user with the password you typed in for windows to connect with.

Now try connecting to the server using windows map network
drive. On Windows XP you will see the following. So type \\raspberrypi\usb in
the Folder field.

Connecting to a <a href='#raspberrypi' data-lazy-src=

Now click on the [Connect using a different user name] link
and enter raspberrypi\pi in the user name field and raspberry in the password
field.
NOTE: windows will always by default try your username and password
from your PC to make the connection (in my case my PC is called VNET and my
username is simon so you see VNET\simon in the window), and as we only
have the one user on the Raspberry Pi, we have to specify that the user connecting is
one that exists on the Pi. We also have to also specify the machine that the user is
on before the user name therefore the username is raspberrypi\pi.

Then click [OK] which will close the pop-up and
[Finish], this should now map your drive to the Raspberry
Pi NAS server.

9. Right the samba share is working, however if you reboot the Pi then the
drive will not be auto mounted, and therefore the share will be empty — so we will
need to install a command called autofs which is designed to automatically mount
usb disk drives.

pi@raspberrypi~$ sudo apt-get install autofs
This will install the auto usb mounting system.

9. However we need to set up a config file to allow the automounting of
the usb disk.

pi@raspberrypi~$ sudo vi /etc/auto.master
At the end of the file is the following

——————————————————
+auto.master
——————————————————

You need to add the following below the +auto.master entry

——————————————————
+auto.master
/media/ /etc/auto.ext-usb —timeout=10,defaults,user,exec,uid=1000
——————————————————

Now you can reboot and the server will keep on working and sharing your windows
files on boot

If you dont want your server called raspberrypi then change its name by reading
«How2Setup Rename my Pi».

This post will walk you through using Samba on a Raspberry PI as a (Windows) domain controller. I prefer Debian Linux (Raspbian) for this. And I am assuming you are comfortable setting up your Raspberry with a standard image for this.

Source file

As the domain name, this article will talk about using waal70.org. Replace with your own(ed)!

  • Install Raspbian Jessie, making sure the hostname adheres to NETBIOS requirements (no longer than 15 characters)
  • Choose a name for your domain-controller to control: waal70.org
  • Make sure the server uses a static IP, by editing /etc/dhcpcd.conf
  • Disable resolvconf or write protect the resolv.conf by changing its attributes:
    sudo chattr +i /etc/resolv.conf
  • Set static IP
  • Disable Samba:
    ps ax | egrep "samba|smbd|nmbd|winbindd"

    , kill -9 if necessary

  • Verify that the /etc/hosts resolves the FQDN and shortname of the DC:
    <LOCAL_IP_ADDRESS>  dc1.waal70.org dc1"
  • They must not resolve to localhost!
  • Remove (if any) existing smb.conf:
    smbd -b | grep "CONFIGFILE"

    If you really started out with a fresh Raspbian Lite install,
    you will not have Samba running and using any Samba command, for now, will yield an error, which you can ignore.

  • Remove all Samba database files:
    smbd -b | egrep "LOCKDIR|STATEDIR|CACHEDIR|PRIVATE_DIR"
      LOCKDIR: /usr/local/samba/var/lock/
      STATEDIR: /usr/local/samba/var/locks/
      CACHEDIR: /usr/local/samba/var/cache/
      PRIVATE_DIR: /usr/local/samba/private/
  • Remove an exisiting /etc/krb5.conf file

Installing Samba and the works

  • Raspbian will contain SUDO, if you’re reading this for other Debian Linux, it will need to be installed:
    apt-get install sudo
  • add your normal user to the sudo-group. Again, from Raspbian this is pre-configured, so skip this step, only execute on other Debian versions: (as root:
    sudo usermod -aG sudo <username>
  • Install the Kerberos5 software:
    sudo apt-get install krb5-user
  • Then, finally, install Samba:
    sudo apt-get install samba
  • The Samba-tool which we use later on expects to re-write several config files. The best option is to remove them before running the samba tool, so: re-remove the krb5.conf file as well as the smb.conf (back it up if you feel more comfortable with that:
    sudo rm /etc/krb5.conf
    sudo rm /etc/samba/smb.conf

Provision a Samba active directory:

Now, the real work. We will use the samba-tool to provision an Active Directory. We will add the rfc2307 extensions there for compatibility with *NIX based systems, because, well, I use Linux a lot as well.

  • The main script to call is samba-tool, which we will tell to add the extensions and do the rest of the config in a challenge/response way:
    sudo samba-tool domain provision --use-rfc2307 --interactive
  • Answer all the questions; mainly which domain to control and provide a password. Please note that initially, password complexity requirements will be on, meaning the Administrator password you provide needs to be at least 7 characters long, as well as contain a mix of lowercase, uppercase and numeric characters.
  • Manually edit resolv.conf, make sure it reflects the correct settings:
    domain waal70.org
    search waal70.org
    nameserver <LOCAL_IP_ADDRESS>
  • The Samba-tool created a Kerberos-config, which we will link to become “official”:
    ln -sf /var/lib/samba/private/krb5.conf /etc/krb5.conf
  • Install smbclient to test:
    sudo apt-get install smbclient
  • Install winbind because it no longer ships with Samba:
    sudo apt-get install winbind
  • Now, stand-up your Samba server, and while we are at it, let’s make sure it will be stood up after a restart as well:
    sudo systemctl unmask samba-ad-dc.service
    sudo systemctl enable samba-ad-dc.service
    sudo systemctl restart samba-ad-dc.service
    

    Helpfully enough, while the rest of the world refers to Samba as “samba” or “smbd”, Debian refers to it as “samba-ad-dc”…

  • Now, Samba should be up and running. Test this by checking for samba processes:
    ps -axf | grep "samba"

    Which should yield a nice overview of nested Samba-processes (10 or so). If not, you can check what’s not right by running Samba interactively:

    sudo samba -i

    The output should provide some pointers as to what is going wrong. In my case, often I would have to (re-)install winbind.

  • Test the Active Directory by checking the entry for itself:
    smbclient -L localhost -UAdministrator

Adding objects to the AD:

This is for reference only, as my preferred way of administering the AD is through the use of NSAT (see below)

  • /usr/local/samba/bin/samba-tool user create USERNAME

Changing password complexity:

This is for reference only, as my preferred way of administering the AD is through the use of NSAT (see below)

sudo samba-tool domain passwordsettings set --complexity=off
sudo samba-tool domain passwordsettings set --history-length=0
sudo samba-tool domain passwordsettings set --min-pwd-age=0
sudo samba-tool domain passwordsettings set --max-pwd-age=0

RSAT for remote admin of your Active Directory:

The following are the recommended features to administer a Samba Active Directory installation:
Get the download for RSAT (windows 7) here. Please note the localized version, taking care to install the correct locale for your Windows installation.
It installs as an additional update, so after installing, go into Control Panel – Programs and Features – Turn Windows Features on or off
Select the following features, that then become available through the Management Console (mmc.exe):
Feature Description
Group Policy Management Tools Provides the Group Policy MMC Snap-ins: Management Tool, Management Editor and Starter GPO Editor.
Active Directory Module for Windows PowerShell Optional. Enables Active Directory (AD) PowerShell cmdlets.
AD DS Tools Provides the Active Directory Users and Computers (ADUC) and Active Directory Sites and Services MMC Snap-in.
Server for NIS Tools Adds the UNIX Attributes tab to ADUC objects properties. It enables you to configure RFC2307 attributes.
DNS Server tools DNS MMC Snap-in for remote DNS management.
Remote Desktop Services Tool Optional. Adds the Remote Desktop Services Profile tab to the ADUC user object’s properties and installs the RDP server administration MMC Snap-in. Install this feature to configure remote desktop protocol (RDP) settings in ADUC.

Please note that most of these tools will not work from a computer that is not already part of the domain. Here, the RUNAS tool is your friend, as  you can use it to run within a different user context. To achieve this, create a new BATCH-file having the following contents:

runas /netonly /user:Administrator@WAAL70 "mmc %SystemRoot%system32dsa.msc /domain=WAAL70"

This will ask you for the Administrator password and log you in accordingly. It may be necessary, once the management console is started up, to re-select domain controller and type in the name or ip-address of your domain controller.
For more names of snap-ins, refer to this excellent resource

Troubleshooting

In a apt-get upgrade, sometimes, the service will fail to (re)start. In the NSAT resources you will see messages such as “RPC unavailable”

Try the following to repair:

1. Re-enable the service

sudo systemctl unmask samba-ad-dc.service
sudo systemctl enable samba-ad-dc.service
sudo systemctl restart samba-ad-dc.service
ps -axf | grep samba

The last command should yield a nice tree of samba processes running.

2. Re-install Winbind

sudo apt-get purge winbind
sudo apt-get install winbind

Then, revert to re-enabling samba as mentioned under 1.

This provides basic details of how to configure a Raspberry Pi as a samba server. This will allow Windows (and other Operating Systems) to access data on the Raspberry Pi across a network similar to how this is available using a Windows computer.

This is useful for making files available on your local network so that you can watch / listen to them using Kodi, or with the correct settings as a way of sharing files with colleagues.

This assumes you have already installed the Raspberry Pi using a recent Raspbian distribution.

Install the samba software using

sudo apt install samba

As root edit the file /etc/samba/smb.conf

Set workgroup to the name of your local workgroup (this can be left at the default WORKGROUP if you don’t already have a workgroup). If you would like to use the Raspberry Pi as a server for the windows name service then you can change the wins support entry to yes and remove the ‘#’ which indicates that line is a comment.

Now go to the bottom of the file and add any required shares

The following example shows an example for a file share that could be useful for sharing media files for a Kodi client on your local network.



[fileshare]

comment = File Share

writeable = no

guest ok = yes

path = /data

Start the service with the command

sudo service smbd start

This provides a guest readable (none writeable) file share, which can be accessed on Linux as:

smb://<ipaddress>/fileshare

Or on a windows system as:

\\<ipaddress>\\fileshare

For more details of Samba configuration options see the Samba website.

Other Raspberry Pi Projects and tutorials

  • Raspberry Pi Tutorials and Projects

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как установить windows на нетбук dexp
  • Контрольная сумма md5 windows 10
  • Risen список игр games for windows
  • Ошибка 0x00000f windows 10
  • Приложение для tws наушников windows