Showing posts with label windows 10. Show all posts
Showing posts with label windows 10. Show all posts

Setting a Git Server on a LAN

 

Instead of relying on a third party platform, if you have a spare linux server, it can be handy to setup your own local git server.

That means that you will not have to rely on github, or gitlab, and can perform your own lab, with versioning

On the server - let's call this host "myHub"

these steps will have to be done:

- installing ssh (openssh-server)

- installing git 

on the client machine a ssh public key will have to be generated using

- ssh-keygen -o

the key will be in ~/.ssh/id_rsa.pub and will need to be copied over the server as authorized.

https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols

Back to the local git server "myHub"

$ adduser git

$ su git

$ cd

$ mkdir .ssh

$ chmod 700 .ssh

$ touch .ssh/authorized_keys

the file is created with 0 in size (empty)

$ chmod 600 .ssh/authorized_keys

I recommend to copy and paste the key from the client into the server (in /tmp).

then append this file into the authorized_keys file

$ cat /tmp/id_rsa.pub >> authorized_keys

If you follow the video above, then you will have the git repositories inside the /var/www folder

#  mkdir project.git

# chown git:git project.git

$ cd project.git

$ git init --bare

that is done for the server side

Now on the client side

go to your source (or folder you want to push into the git server "myHub")

then add the git remote address

$ git remote add origin git@myHub:/var/www/project.git main

$ git push --set-upstream origin master:main

$ git log

on the first commit, you will have to declare the user.email and user.name (as global or local)

and from other machine to fetch the source

$ git clone git@myHub:/var/www/project.it -b main

 


Accessing a Linux Samba share

The installation of Samba on a Linux server is a way to allow other OS to connect to it, by using a common sharing protocol.


Before we begin, best is to know the ip address of the linux samba server

usually this address is in the range of 192.168.1.x (e.g: 192.168.1.2) 

I will assume the address is 192.168.1.4

and the samba shared folder is /home/smbshazam 

So first how to access a Linux Samba Server Files from:


From Windows

Start button -> Run (or pressing cmd+R)

Type: \\192.168.1.4\home\smbshazam


From Mac OS

Menu Go -> Connect to server (cmd+K)

In the "Server Address" field, type:

smb://192.168.1.4

and press Connect

then select guest and OK






Setting up a Samba share on Linux (Ubuntu)

As the last release running 32bits is now defunct

Canonical decided to drop support for 32-bit computers, 
so they stopped releasing 32-bit ISOs since Ubuntu 18.04

If you still have an old laptop i686 then maybe its last use will be to work as a NAS (network attached  Storage) in a LAN ...

It is time to setup a Samba server, before all repositories are wiped out.

First
$ sudo apt-get install samba smbfs -y

to get the packages

Then 
$ cd /etc/samba
$ sudo su
# cp smb.conf smb_original.bkp
# vi /etc/samba/smb.conf

Making a bakcup copy of the original smb.conf file is good practice

This should be the content of the smb.conf file

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

I will call my shared folder 'smbshazam' but this is of course completely up to you to choose a different name (shared, or smbshar, or whatever is you prefer)

Create the share folder: sudo mkdir -p /home/smbshazam
Set the permissions: sudo chmod 0777 /home/smbshazam

# shazam share
[MyShare]
  comment = whatever comment you want there
  path = /home/smbshazam
  read only = no
  guest ok = yes

That was step 2 on the ubuntu linux server machine setup
Restart samba. type: 

$ /etc/init.d/smbd restart
$ systemctl status smbd

you are all set in ubuntu
(an additional step could be to test the Samba configuration using 'testparm')

A more advanced configuration setup could be found at https://phoenixnap.com/kb/ubuntu-samba





Touchpad disappeared completely on Dell Latitude 7480 running Windows 10

How it was before

Before this Windows update - the touchpad was appearing in mouse & touchpad
after the update only the mouse appeared
the touchpad was unresponsive - when the mouse was unplugged, there was even no mouse cursor
very annoying

I suspect that if the cause was not the Windows update - it might have been the consequence of a prolonged sleep mode activated on the laptop - (as I was using an external keyboard and mouse - I didn't not realised there was a problem at all for some time.)

How I fixed it

I restarted when the Dell logo appeared I pressed the F12 button to enter the bios
and from the Bios screen the mouse cursor re-appeared - which confirmed to me that the problem was not a hardware issue - from that I just rebooted and windows got the cursor back from the touchpad - and the mouse & touchpad would show the touchpad again (and even the pointstick, which I never use)

Related Posts with Thumbnails