The following sections feature various methods for sharing data. Use one of these if you are looking for a permanent solution for data sharing.
To configure the server, proceed as follows:
Prepare the system:
Open a shell, log in as root and grant write permissions to
all users:
mkdir /srv/nfs chgrp users /srv/nfs chmod g+w /srv/nfs
Make sure users of the same name exist on client and server. Refer to Chapter 5, Managing Users with YaST for a detailed instruction on how to create and manage user accounts.
Prepare the NFS server:
Start YaST as root.
Select +.
Enable NFS services with .
Open the appropriate firewall port with , if you are using a firewall.
Export the directories:
Click and select
/srv/nfs.
Set the export options to:
rw,root_squash,async
Repeat these steps, if you need to export more than one directory.
Apply your settings and leave YaST. Your NFS server is ready to use.
To start the NFS server, enter the following command (as root):
rcnfsserver start
To stop the server, enter:
rcnfsserver stop
To configure the client, proceed as follows:
Prepare the NFS client:
Start YaST as root.
Select +.
Activate , if using a firewall.
Import the remote file system:
Click .
Enter the name or IP address of the NFS server or click to automatically scan the network for NFS servers.
Enter the name of your remote file system or automatically choose it with .
Enter an appropriate mount point, for example
/mnt.
Repeat these steps, if you need to import more than one external directory.
Apply your settings and leave YaST. Your NFS client is ready to use.
To manually start the NFS client, enter:
rcnfs start
![]() | Consistent Usernames |
|---|---|
If your home network is used by just a small number of users, set up the users manually across the machines. If you, however, need a larger and consistent user base across a larger home network, consider using NIS or LDAP to manage user data. For more information on these, refer to Chapter Using NIS (↑Reference) and Chapter LDAP—A Directory Service (↑Reference). | |
This sections introduces various methods to access files on a Samba server. Both KDE and GNOME ship with graphical tools to work with Samba shares and there is of course a command line tool for accessing Samba servers.
Both desktops, KDE and GNOME, can access Windows shares through their file browsers. To access your Windows share, proceed as follows:
Press Alt-F2 and enter
smb://sun.example.com/.share
The syntax of this URL is:
smb:// where HOST/SHARENAMEHOST represents the hostname
(sun.example.com) or IP address, and
SHARENAME represents the share (see Step 3.b.)
Log in providing username and password. Set the password in Step 4 or just hit Enter.
Drag and drop any files or directories from or to your window.
If you do not know your workgroup, enter smb:/ to list all workgroups available in your network.
The Smb4K tool (package smb4k) can be used to display all
workgroups in your network and mount them on demand.
If you prefer using command line, use the smbclient command. To log in to your Samba server, call:
smbclient //sun/share -U tux
Omit the -U option if you are the current user
tux. After having
logged in successfully, use some basic commands like ls
(list contents), mkdir (create directory),
get (download file), put (upload
file) and others. Use help to display all commands.
Refer to the manual page of the smbclient command for
more information.