Archive

Posts Tagged ‘LAN’

Samba File sharing between two ubuntu systems in LAN

November 3rd, 2008

With two systems connected in LAN is so easy to share files and folders in Ubuntu. Here i tell you how to share files and folders with samba file server between two ubuntu systems with few clicks. The Ubuntu Iam using here is Hardy.

The system that has source contents to be shared should have Samba server, (That can be installed in course of the procedure how to share). And the remote system that wish to access the source contents should have the Samba client. Samba client will installed be default in ubuntu, if not install it with the command

$sudo apt-get install smbclient

Here comes the procedure how to share.

Soruce Side

  1. On the source system login to ubuntu, right click on the folder you wish to share and select ‘Sharing Options’.

  2. In the Dialog box that apears select ‘Share this Folder’ check box, you will be prompted to install a service. Clicking on Install will open synaptic package manager and install the Samba Server packages.

  3. On successful Installation of the packages, the part in the server side is over.

    This will create a share automatically in Samba server on the the username you have logged in (here ‘rosario’) with its password.

Destination Side

  1. Check whether the smbclient package is installed, if not install it with the above command.

  2. Use the command like
  3. $sudo smbclient \\\\192.168.1.33\\photos -U rosario

    • where rosario is the username of the source system,
    • 192.168.1.33 is the IP address of the source system
    • photos is the name of the folders shared in the source system(In small characters)
  4. The above command first will prompt the local system password as sudo is used. And then it will prompt for the password of the remote samba server for the username rosario
  5. On giving the right password, it will take to the samba promt.

Smb: \>

Some usefull commands

  • help- To know all possible commands
  • dir- To list out all the shared directories, or contents inside the current directory
  • cd- Change Directory
  • get- To copy a specified file from the source system to the local system
  • put- To copy contents from local system to the server system

Enjoy Easy File Sharing With Ubuntu…

Linux Networking, Ubuntu ,

Copying File across Between two systems in a Lan

July 9th, 2008

If in a Lan, Ping between two system to check the availability of the connection. If peer to peer, connect the lan cable. Assign the IP addresses for the two systems (Like 172.16.25.1 and 172.16.25.2 for both the systems, with subnet mask 255.255.255.0). That is the subnet addresses should be same for both the systems.

scp is the command that can be used for transfering files across the systems. Secure Copy(scp) uses Open SSH protocol for the file transfer. ftp can also be used for the file transfer. For using the scp command you must follow a rule. The rule is, the system you invoke this command should have the ssh client and the target system should have the ssh server(sshd). For copying the files from the source to the destination system, this command can be invoked in both source system or the destination system, but should follow the above rule.

The usage is the scp command is,

#scp username@<source-ip> :/path/to/the/source/file username@<destination-ip> :/path/to/the/destination/file

To copy a folder from the source system to the destination use the recursive the option,

#scp -r username@<source-ip> :/path/to/the/source/folder username@<destination-ip> :/path/to/the/destination/folder

The first user name is the user in the source system and the second username is the user in the destination system. The access privileges to the files or folder to copied or to be used as the destination folder depends on the user privileges used in the command.

Linux Networking , ,