Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Samba HowTo Guide
Prev Home Next

Creating, Editing, and Removing Shares

A share can be added using the net rpc share command capabilities. The target machine may be local or remote and is specified by the -S option. It must be noted that the addition and deletion of shares using this tool depends on the availability of a suitable interface script. The interface scripts Sambas smbd uses are called add share command, delete share command and change share command A set of example scripts are provided in the Samba source code tarball in the directory ~samba/examples/scripts.

The following steps demonstrate the use of the share management capabilities of the net utility. In the first step a share called Bulge is added. The sharepoint within the file system is the directory /data. The command that can be executed to perform the addition of this share is shown here:

root#  net rpc share add Bulge=/data -S MERLIN -Uroot%not24get

Validation is an important process, and by executing the command net rpc share with no other operators it is possible to obtain a listing of available shares, as shown here:

root#  net rpc share -S MERLIN -Uroot%not24get
profdata
archive
Bulge   <--- This one was added
print$
netlogon
profiles
IPC$
kyocera
ADMIN$

Often it is desirable also to permit a share to be removed using a command-line tool. The following step permits the share that was previously added to be removed:

root#  net rpc share delete Bulge -S MERLIN -Uroot%not24get

A simple validation shown here demonstrates that the share has been removed:

root#  net rpc share -S MERLIN -Uroot%not24get
profdata
archive
print$
netlogon
profiles
IPC$
ADMIN$
kyocera

Samba HowTo Guide
Prev Home Next

 
 
  Published under the terms fo the GNU General Public License Design by Interspire