open port with using service file of firewall-cmd. (script

8
This is what worked for me. I went through trial and error completely reformatting the drive each time until I got a clean install and it worked great. Fedora 31 will not show a mouse cursor on a Supermicro server but Fedora 32 (beta) does so I used it there as well. Setting up linux cinnamon 32 on a laptop/workstation (Mine was an Acer 5745g with nvidia GTforce 330m) I used btrfs file system – swap double the RAM size and 2GB boot partition – it works great I used a 256gb SSD Hostnamectl set-hostname mynewcomputername (where mynewcomputername is the new hostname) Disable selinux (it’s a pain in the ass) edit /etc/selinux config file set selinux to disabled and reboot SAMBA – what a problem (you can just copy these commands into a terminal and run ******) dnf –y install samba systemctl enable smb systemctl start smb systemctl enable nmb systemctl start nmb Open port with using service file of firewall-cmd. (script again *****) $ sudo firewall-cmd --add-service=samba –permanent $ sudo firewall-cmd --reload firewall-cmd --zone=public --add-port=137/tcp --permanent firewall-cmd --zone=public --add-port=137/udp –permanent firewall-cmd --zone=public --add-port=138/tcp --permanent firewall-cmd --zone=public --add-port=138/udp –permanent firewall-cmd --zone=public --add-port=139/tcp --permanent firewall-cmd --zone=public --add-port=139/udp –permanent firewall-cmd --zone=public --add-port=445/tcp --permanent firewall-cmd --zone=public --add-port=445/udp --permanent firewall-cmd --add-source-port=137/tcp --permanent firewall-cmd --add-source-port=138/tcp --permanent firewall-cmd --add-source-port=139/tcp --permanent firewall-cmd --add-source-port=445/tcp --permanent Samba users and shares allowing access to Samba user above # smbpasswd -a testuser (where testuser is your username) New SMB password: Enter a password Retype new SMB password: Enter the same password again Added user testuser.

Upload: others

Post on 15-Oct-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Open port with using service file of firewall-cmd. (script

This is what worked for me. I went through trial and error completely reformatting the drive each time

until I got a clean install and it worked great. Fedora 31 will not show a mouse cursor on a Supermicro

server but Fedora 32 (beta) does so I used it there as well.

Setting up linux cinnamon 32 on a laptop/workstation (Mine was an Acer 5745g with nvidia GTforce

330m)

I used btrfs file system – swap double the RAM size and 2GB boot partition – it works great

I used a 256gb SSD

Hostnamectl set-hostname mynewcomputername (where mynewcomputername is the new hostname)

Disable selinux (it’s a pain in the ass)

edit /etc/selinux config file set selinux to disabled and reboot

SAMBA – what a problem (you can just copy these commands into a terminal and run ******)

dnf –y install samba

systemctl enable smb

systemctl start smb

systemctl enable nmb

systemctl start nmb

Open port with using service file of firewall-cmd. (script again *****)

$ sudo firewall-cmd --add-service=samba –permanent

$ sudo firewall-cmd --reload

firewall-cmd --zone=public --add-port=137/tcp --permanent

firewall-cmd --zone=public --add-port=137/udp –permanent

firewall-cmd --zone=public --add-port=138/tcp --permanent

firewall-cmd --zone=public --add-port=138/udp –permanent

firewall-cmd --zone=public --add-port=139/tcp --permanent

firewall-cmd --zone=public --add-port=139/udp –permanent

firewall-cmd --zone=public --add-port=445/tcp --permanent

firewall-cmd --zone=public --add-port=445/udp --permanent

firewall-cmd --add-source-port=137/tcp --permanent

firewall-cmd --add-source-port=138/tcp --permanent

firewall-cmd --add-source-port=139/tcp --permanent

firewall-cmd --add-source-port=445/tcp --permanent

Samba users and shares allowing access to Samba user above

# smbpasswd -a testuser (where testuser is your username)

New SMB password: Enter a password

Retype new SMB password: Enter the same password again

Added user testuser.

Page 2: Open port with using service file of firewall-cmd. (script

On Fedora boxes Edit /etc/samba/smb.conf – These worked for F32 Beta ####

[global]

Workgroup = YOURWORKGROUPNAME (where YOURWORKGROUPNAME is the workgroup name)

security = user

passdb backend = tdbsam

wins support = yes

netbios name = mynewcomputername or whatever you desire

name resolve order = wins lmhosts bcast host

#end for beta

To setup an external XFS drive

Fdisk –l - get the device name of the second drive (i.e. sdb)

cd/mnt

mkdir Plexdrive

mount –o inode64 /dev/sdb /mnt/Plexdrive

or more permanent

/etc/fstab

UUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /mnt/Plexdrive xfs defaults 0 0

For shares

[Movies]

path = /mnt/Plexdrive/Movies (this is for the external – change as needed)

browseable = yes

read only = no ( I run only on a local net where I copy files to it)

valid users = yourusername

Run smbclient -U username -L localhost –W YOURWORKGROUPNAME to list the available

shares, where username is the Samba account added in step 7. When prompted for a password, enter

the password assigned to the Samba account above at the smbpasswd add.

dnf –y install wsdd

wsdd.service looks like this

[Unit]

Description=Web Services Dynamic Discovery host daemon

Requires=network-online.target

After=network.target network-online.target multi-user.target

Page 3: Open port with using service file of firewall-cmd. (script

[Service]

Type=simple

ExecStart=/usr/bin/wsdd -w YOURWORKGROUPNAME

[Install]

WantedBy=multi-user.target

copy wsdd.service with WORKGROUP name in it to /etc/systemd/system

systemctl enable wsdd

systemctl start wsdd

REBOOT at this point

To Access older Linux devices from Windows 10

Control Panel, Programs, Windows Features, turn on SMB1 CIFS client

Reboot – ironically these were required for the full release of Fedora 32. For older client access add this to the /etc/samba/smb.conf in global section

client min protocol = CORE

server min protocol = CORE

max protocol = SMB2

Systemctl reenable smb nmb

systemctl restart smb nmb

3 If SELinux kept on

enable access to home directory without samba_share_t label.

$ setsebool -P samba_enable_home_dirs on

setsebool –P samba_export_all_rw=1

service smb status

service nmb status

Therefore smbclient could be convinced to connect by:

$ smbclient --user=testuser --ip-address=127.0.0.1 --option='client min

protocol = CORE' //testhost/C testtest

Or setting 'client min protocol = CORE' globally

in /etc/samba/smb.conf.

**************** To allow Remote Desktop Access to this machine: ***********************

dnf –y install xrdp

systemctl enable xrdp.service

systemctl start xrdp.service

systemctl enable xrdp-sesman.service

systemctl start xrdp-sesman.service

Page 4: Open port with using service file of firewall-cmd. (script

firewall-cmd --zone=public --add-port=3389/tcp --permanent

firewall-cmd --zone=public --add-port=3389/udp --permanent

firewall-cmd --zone=public --add-port=3350/tcp --permanent

firewall-cmd --zone=public --add-port=3350/udp –permanent

firewall-cmd --zone=public --add-port=6789/tcp --permanent

firewall-cmd --zone=public --add-port=6789/udp –permanent

firewall-cmd --add-source-port=3389/tcp --permanent

firewall-cmd --add-source-port=3389/udp --permanent

firewall-cmd --add-source-port=3350/tcp --permanent

firewall-cmd --add-source-port=3350/udp --permanent

firewall-cmd –reload

If you have problems attaching

vi /etc/sysconfig/desktop

unset DBUS_SESSION_BUS_ADDRESS; cinnamon-session

edit the file /etc/X11/Xwrapper.config and set allowed_users=anybody there.

sudo sed -i \

's/allowed_users=console/allowed_users=anybody/'

/etc/X11/Xwrapper.config

systemctl stop firewalld

systemctl start firewalld

systemctl status firewalld (is it up?)

Note: if you experiencing bug:

xrdp fails to start with permission denied error

https://bugzilla.redhat.com/show_bug.cgi?id=1177202

this is the workaround:

# chcon --type=bin_t /usr/sbin/xrdp

# chcon --type=bin_t /usr/sbin/xrdp-sesman

# systemctl reenable xrdp.service

# systemctl start xrdp.service

You may have to add .xsession to yourusername /home/yourusername

Possible look at /etc/xrdp/xrdp.ini and sesman.ini

Something weird about hostname.local controlled by mDNS and avahi

Possibly systemctl disable avahi-daemon

Possibly ln –sF /run/system/resolve/resolv.conf /etc/resolv.conf

Reversal is rm /etc/resolv.conf

Restore firefox .json backup

dnf –y update

Page 5: Open port with using service file of firewall-cmd. (script

-add negativo17 stuff

https://negativo17.org

download ONLY the multimedia repo

Installing HandBrake/MakeMKV (Must do this BEFORE rpmfusion repo is

added)

To install the repository on a supported Fedora distribution, run as root the following command: dnf config-manager --add-repo=https://negativo17.org/repos/fedora-

multimedia.repo

To install the repository on CentOS/RHEL: yum-config-manager --add-repo=https://negativo17.org/repos/epel-

multimedia.repo 5

yum/dnf -y install HandBrake-gui HandBrake-cli

yum/dnf -y install makemkv

Registering MakeMKV to avoid expiration

Please use the provided beta registration key published by the developers:

http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053

After starting MakeMKV just press the “Register” button and paste the provided code.

Run Makemkv and change expert advanced preferences ccextractor to /usr/bin

Brother Printers socket://10.0.0.115 for color HL-3170-cdw socket://10.0.0.43 for MFC-7860dw

then restart cups

systemctl stop cups

systemctl start cups

If you get a notification that SeLinux has problems with brcupsconfig3

setsebool -P cups_execmem 1

Add RPMFusion to repositories – needed for audio stuff.

To enable access to both the free and the nonfree repository use the following command:

Fedora 22 and later:

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-

free-release-$(rpm -E %fedora).noarch.rpm

https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-

release-$(rpm -E %fedora).noarch.rpm

Page 6: Open port with using service file of firewall-cmd. (script

dnf update -y

laptop - dnf -y install gimp – themes icons legacy

dnf -y install vlc (Video Player)

laptop - dnf -y install audacity

dnf -y install java

laptop - dnf -y install inkscape – tango icon theme (Vector graphics)

laptop - dnf -y install filezilla (FTP package)

laptop - dnf -y install clementine (Music Player)

laptop – dnf –y install krita (paint package)

laptop – dnf –y install scribus (Publishing package)

laptop – dnf -y install ffmpeg (music and video stuff)

Copy music from old machine to new then fix audio drivers

For Netgear NAS (Readynas Duo)

Download the Linux version of Netgear RaidAR

https://kb.netgear.com/20684/ReadyNAS-Downloads

Add these commands

firewall-cmd –permanent –add-source-port=22081/udp –zone=public

firewall-cmd --reload

If Updating from Fedora 31 to 32

dnf upgrade –refresh

dnf install dnf-plugin-system-upgrade

dnf system-upgrade download --releasever=32

dnf system-upgrade reboot

To enable shortcuts to open as root

https://forums.linuxmint.com/viewtopic?t=191711

sudo visudo

%wheel ALL=(ALL:ALL) ALL

To run Windows programs

dnf –y install wine

For iTunes you need version 12.3.0 or earlier or you will get a black app screen

For Fedora32 – need to downgrade Wine to 5.5-1 from 5.6-1 so iTunes works

Change any playlists to:

Z:\home\yourusername\Music\.....

iTunes Media Library.xml

file://localhost/Z:/home/yourusername/Music/....

If you have nVidia drivers and get a popup that your video card is not recognized

Follow instructions at https://if-not-true-then-false Fedora 19 nvidia driver update

Page 7: Open port with using service file of firewall-cmd. (script

https://www.if-not-true-then-false.com/2013/fedora-19-nvidia-guide/

lspci |grep -i VGA

## Example output ##

01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce G210]

(rev a2)

Dnf localinstall --nogpgcheck

http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E

%fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-

nonfree-release-$(rpm -E %fedora).noarch.rpm

2.4 Install nVidia proprietary drivers for GeForce

6/7/8/9/200/300/400/500/600/700 series cards

Select akmod, kmod from following.

akmod-nvidia for GeForce 8/9/200/300/400/500/600/700 series cards

dnf install akmod-nvidia xorg-x11-drv-nvidia-libs kernel-devel acpid

2.5 Remove / disable nouveau drivers from kernel initramfs

## Backup old initramfs nouveau image ##

mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

## Create new initramfs image ##

dracut /boot/initramfs-$(uname -r).img $(uname -r)

2.6 All is done and then just reboot reboot

Plex Media Server setup

https://bendavis.me/2015/03/29/setup-plex-media-server-on-fedora/

Download latest Plex Media Server from plex.tv

dnf –y install (plexmediaserverxxxxx.rpm)

Systemctl enable plexmediaserver.service && systemctl start plexmediaserver

sudo gpasswd –a plex yourusername

chmod –R 755 /mnt/Plexdrive/ - your entire Plex XFS drive

In the firewall GUI – open Plex ports

To import iTunes Play Lists

edit the iTunes Media Library.xml to use the Linux path

file://localhost/mnt/Plexdrive/Music/...

Programs I have successfully run under Wine:

Page 8: Open port with using service file of firewall-cmd. (script

Search and Replace (Funduc)

iTunes

iTunes Export (playlists and songs to m3u) using Adobe Air (set clock to 1 Oct 2017)

Any Video Converter

Minitool Partition Manager (like gparted)

Firefox – add the YouTube Video and Audio Downloader (Dev Edt.)

also ublock origin and Media Converter and Muxer - Audio Tools

Download youtube video files and convert to mp3 or use any video converter

Final notes – this works for me. Some may disagree but I don’t care – this works.

Helpful Links

Handy Links for Fedora 32

http://albumbrowser.klarita.net/itfw.html (iTunes folder Watcher)

http://blog.add0n.com/2015/05/11/a-guide-to-video-and-audio-conversion-using-ffmpeg.html

https://www.if-not-true-then-false.com/2013/fedora-19-nvidia-guide/

https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/

HP17t bug – put a blank UEFI GPT drive in another USB port to boot the LiveCD in another port.

https://bugzilla.redhat.com/show_bug.cgi?id=1756735

https://www.maketecheasier.com/graphics-card-information-linux/

https://linoxide.com/file-system/create-mount-manage-xfs-filesystem-fedora-22/

http://blogs.reliablepenguin.com/2015/06/05/xfs-requires-inode64-on-large-filesystems

https://ask.fedoraproject.org/t/cant-install-fedora-31/4556/12

https://forums.linuxmint.com/viewtopic.php?t=191711

https://forums.fedoraforum.org/showthread.php?310870-F24-Unable-to-boot-Live-image

https://www.brother-usa.com/brother-support

https://www.privateinternetaccess.com/pages/download

https://bendavis.me/2015/03/29/setup-plex-media-server-on-fedora/

https://github.com/mrworf/plexupdate

https://www.ericdaugherty.com/dev/itunesexport/