Posts Tagged ‘Home’

15
Oct

Samba Configuration

   Posted by: Vlad    in Linux

Samba provides file and print services for various Microsoft Windows clients and runs on most Unix and Unix-like systems, such as Linux, Solaris, AIX and the BSD variants, including Apple’s Mac OS X Server.

Samba is an implementation of dozens of services and a dozen protocols, including NetBIOS over TCP/IP (NBT), SMB, CIFS (an enhanced version of SMB), DCE/RPC or more specifically, MSRPC, the Network Neighborhood suite of protocols, a WINS server also known as a NetBIOS Name Server (NBNS), the NT Domain suite of protocols which includes NT Domain Logons, Secure Accounts Manager (SAM) database, Local Security Authority (LSA) service, NT-style printing service (SPOOLSS), NTLM and more recently Active Directory Logon which involves a modified version of Kerberos and a modified version of LDAP. All these services and protocols are frequently incorrectly referred to as just NetBIOS or SMB. Samba can also see and share printers. Read the rest of this entry »

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

19
Aug

Export CSV from MySql Database via SSH

   Posted by: Vlad    in Linux

There is a time when you need to export a specific table from a mysql database. Through SSH this is made very easy using the following command:

echo “select * from table_name;” | mysql -u root -pyourpassword database_name | sed -e ’s/^Mn/r/g’ > /home/exported.csv

Of course you can make a small script that adds the date or other usefull information to the filename:

#!/bin/bash
#This scripts adds date to the exported CSV
NOW=$(date +”%m_%d_%Y_%H_%M_%S”)
echo “select * from table_name;” | mysql -u root -pyourpassword database_name | sed -e ’s/^Mn/r/g’ > /home/exported_$NOW.csv

Save this script as export_csv.sh and make it executable, and that’s it.

Tags: , , , , , , , , , , , , , , , , , , , , ,

25
Jun

Simple copy through SSH

   Posted by: Vlad    in Linux

Copying files between remote machines can be easily done
using SCP command.

The syntax is:

copy from a remote machine to my machine:

scp user@192.168.0.1:/home/file.txt /home/x.txt

copy from my machine to a remote machine:

scp /home/x.txt user@192.168.0.1:/home/x.txt

copy all x*.txt from a remote machine to my machine (x01.txt, x02.txt, etc.)

scp “user@192.168.0.1:/home/x*.txt” /home/x.txt

copy a directory from a remote machine to my machine:

scp -r user@192.168.0.1:/home/folder /home/

Tags: , , , , , , , , , , , , , , , , , , , , , , , ,

19
May

Changing Remote Desktop Port

   Posted by: Vlad    in Windows

Remote Desktop is disabled by default in Windows Vista, but it’s easy enough to turn it back on. If you need to access your Vista PC from another box, it’s an essential thing to turn on.

To get to the configuration page, you can either right-click the Computer icon and choose properties, or you can type in system into the start menu search box, and then System.

Now you’ll want to click the Remote Settings link on the left hand side.

Check “Allow Remote Assistance connections to this computer” and “Allow connections from computers running any version of Remote Desktop” (this means that you can access your remote computer using Windows XP also).

Note: This will not work for Home editions of Windows Vista. Read the rest of this entry »

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,