Kali on windows CIFS support - samba

Attempting to mount a network drive using Kali on Windows (The one from the Store) and getting an error when trying to mount.
Kali will automount any local windows drive but ignores a windows networked drive and I can't make a symbolic link to a folder
$ modprobe cifs
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could
not open moddep file
'/lib/modules/4.4.0-18362-Microsoft/modules.dep.bin'
Module cifs not found in directory /lib/modules/4.4.0-18362-Microsoft
modprobe: FATAL: Module cifs not found in directory /lib/modules/4.4.0-18362-Microsoft
/lib/modules/ doesn't exist. So how would I begin to fix this?

using:
sudo mount -t drvfs \\server\directory \mountpoint
WSL now supports drvfs which can connect to remote drives etc.
So no need for cifs/samba

Related

libvirt doesn't create virtqemud-sock on macos

I've installed qemu and libvirt on macos big sur with m1 using macports. When i've tried install libvirt with homebrew, it was broken (asked /proc/cpuinfo, lol). Libvirt started as daemon, i've got libvirt-sock on unix-socket directory, but have no virtqemud-sock.
Actions (all with sudo):
port install qemu
port install libvirt
virsh -c qemu:///system
Result:
error: unable to connect to socket «/opt/local/var/run/libvirt/virtqemud-sock»: No such file or directory
Libvirt started as daemon, i've got libvirt-sock on unix-socket directory, but have no virtqemud-sock.
Libvirt has two ways to running - the monolithic daemon (libvirtd) is the traditional approach and the modular daemons (virt${XXXX}d for varying ${XXXX}) is the new way. The libvirt client here is attempting to connect to the modular daemon virtqemud, but it seems like you've started the monolithic libvirtd
More guidance can be found at
https://libvirt.org/daemons.html
https://libvirt.org/uri.html#mode-parameter

Running Google Cloud SQL Proxy on Raspberry

I'm getting an error while trying to connect raspberry running ubuntu mate to my Google Cloud SQL instance.
These are the step I did to install:
git clone https://github.com/GoogleCloudPlatform/cloudsql-proxy
cd cloudsql-proxy/
sudo sh download_proxy.sh
My instance is configured this way (I deleted some characters in the image and in the code):
I didn't set the network because I'll be using proxy
Then I download into the same folder my JSON key.
wget https://drive.google.com/file/d/my_key.json
And the start the proxy
sudo ./cloud_sql_proxy -instances=be - 21:us-central1:be =tcp:3306 \
-credential_file=./my_key.json &
But I'm getting the error:
pi#pi:~/cloudsql-proxy$ ./cloud_sql_proxy: 1: ./cloud_sql_proxy:
Syntax error: ")" unexpected
I've tried removing the .json and I was getting the same error before without credential, I think that the problem is in the setup.
My dir ls is:
Any help is appreciated :)
download_proxy.sh downloads the proxy compiled for the amd64 architecture of CPU (aka x86_64). Your raspberry Pi has a ARM CPU, so this binary cannot run on your machine.
Google does not provide pre-build ARM versions of the proxy. I don't even know if it is able to build on ARM CPU. If it is possible, this is how you must do it:
Install go, e.g. with apt-get install golang
Setup a GOPATH, as per https://github.com/golang/go/wiki/GOPATH
Run go get github.com/GoogleCloudPlatform/cloudsql-proxy/cmd/cloud_sql_proxy
Run the proxy with $GOPATH/cloud_sql_proxy -instances=...
Ok.
I'm sharing what I did to make it work, as David I don't know what version was I downloading.
I tried to avoid installing Go but it was the only way to get it installed.
sudo apt-get install golang-go
export GOPATH=$HOME/go
go get github.com/GoogleCloudPlatform/cloudsql-proxy/cmd/cloud_sql_proxy
cd $GOPATH/bin
wget your_key.json
sudo ./cloud_sql_proxy -instances=the_full_name_of_the_instance=tcp:3306 -credential_file=./your_key.json &
But I was getting a error because I already have mysql running localy in the same port
So now I'm using a unix soquet
sudo ./cloud_sql_proxy -instances=the_full_name_of_the_instance -credential_file=./your_key.json &
And then it's ready for connections :)
Thanks guys
I found issues with this when compiling SQL-proxy. I did, however, find the instructions here worked great on my raspberry pi 3. Have to make sure to remove all prior installations then reinstall it
wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile`

How do I make gcloud work on opensuse 13.2 in Google Cloud?

I spin up an instance with opensuse 13.2 (x86_64 built on 2015-05-11) in Google Cloud, ssh to the instance, try to run gcloud and get following error:
evgeny#tea-2:~> gcloud
python: can't open file '/usr/bin/../lib/google/cloud/sdk/gcloud/gcloud.py': [Errno 2] No such file or directory
How do I make it work?
Sounds like a bug of some sort. Can try reinstalling it? Try running:
curl https://sdk.cloud.google.com | bash
then log out and log back in
You can pull gcloud directly from Google as shown in Answer #1 or you can use the packaged version from the openSUSE repositories.
After logging in via ssh:
~> sudo -i
# zypper ar -t rpm-md -n 'Cloud Tools Devel' http://download.opensuse.org/repositories/Cloud:/Tools/openSUSE_13.2/ cloud_tools_devel
# zypper install google-cloud-sdk-0.9.44-13.2.noarch
You will need to accept the build key for the new repository that was added.

Chrome OS + VirtualBox Guest Additions

I can't install the VirtualBox Guest Additions in the latest build of Google Chrome OS. When I run the installer, I get the following error:
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.1.8 Guest Additions for Linux.........
VirtualBox Guest Additions installer
mkdir: cannot create directory `/opt/VBoxGuestAdditions-4.1.8': Read-only file system
tar: /opt/VBoxGuestAdditions-4.1.8: Cannot chdir: No such file or directory
tar: Error is not recoverable: exiting now
What do I do now? Can I mount the filesystem in read-write mode? Does the Lime build support the guest additions? I'm using the Vanilla build.
Host OS: Mac OS X Lion (10.7)
Guest OS: Google Chrome OS Vanilla from http://chromeos.hexxeh.net/
VirtualBox version: 4.1.8
So someone on the VirtualBox IRC channel irc://chat.freenode.net/#vbox told me that the guest additions won't work on Chrome OS.
After trying the suggestion from #sarnold, running mount -oremount,rw /, I was told Unable to determine your Linux distribution
If you want to try remounting the filesystem as read-write, the command is:
mount -oremount,rw /
But there might be a good reason for / to be mounted read-only. I doubt the VirtualBox guest tools care where they are installed, so if you just unpack the archive using tar or ar or whatever is necessary, you can probably install them somewhere that is mounted read-write and configure them appropriately.
If you don't mind using dev mode, I was able to run a parrot os vm with qemu and kvm on a pixelbook. I used the change kernel flags script from crouton repo, then installed qemu and kvm packages normally for my debian 9 crouton chroot. Virt manager doesn't work, but I can make a hard drive image with CLI and boot up a vm with CLI and it all works, albeit it is a bit slow even with kvm. Probably cause even a pixelbook has low resources compared to a normal laptop.

How to stacically compile DBD::mysql and move the files on a shared hosting where i have my own perl installation

I have downloaded and installed locally on my Ubuntu ActiveState Perl(ActivePerl-5.14.1.1401-x86_64-linux-glibc-2.3.5-294969.tar.gz).
I did "~$ sudo apt-get install libmysqlclient-dev"
I downloaded from CPAN DBD::mysql
I read INSTALL.html
And here is my problem:
I am not sure how to compile a statically linked DBD::mysql which i can copy from my local ActivePerl installation to the same perl instalaltion but on my shared hosting provider mashine.
Note that the uploaded via ftp(no ssh there) perl directory structure works on the shared hosting (also x86_64-linux) after changing executable file permissions in ActivePerl/bin/ directory.
My CGI scripts run well under mod_cgi and mod_fast_cgi on the shared hosting.
I tried the advises in the installation document(INSTALL.html#source_installation) but no luck.
On another shared hosting with i586 Active Perl DBD::mysql just works because I first installed it locally using PPM and then uploaded via FTP. However there is no x86_64 PPM package provided by ActiveState.
Can sonmebody provide the magick spells for the commandline(ubuntu 11.04), something like:
me#mine:~$ mkdir /tmp/mysql-static
me#mine:~$ cp /usr/lib/libmysqlclien* /tmp/mysql-static
me#mine:~$ cd ~/install/Perl/DBD-mysql-4.019/
me#mine:~/install/Perl/DBD-mysql-4.019$ perl Makefile.PL --libs="-L/tmp/mysql-static -lmysqlclient"
me#mine:~/install/Perl/DBD-mysql-4.019$ make
me#mine:~/install/Perl/DBD-mysql-4.019$ make install
...
...hm :D seems it worked this time, but anyway I wrote all of the above... it might be useful to others. I will upload later today on the shared hosting to see if it works.
This works.
The only thing that one has to be aware is when using it on the shared hosting. You should connect via TCP instead of via Unix socket:
$dsn = "DBI:mysql:database=$database;host=127.0.0.1;port=3306";
$dbh = DBI->connect($dsn, $user, $password);
As written in the docs:
To connect to a MySQL server on localhost using TCP/IP, you must specify the hostname as 127.0.0.1 (with the optional port).