LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Configuring Shared Directories via the Command Line (https://www.linuxquestions.org/questions/linux-server-73/configuring-shared-directories-via-the-command-line-847347/)

frankbell 11-29-2010 08:42 PM

Configuring Shared Directories via the Command Line
 
Would anyone be so kind as to point me to a good reference for how use the command line to configure a directory to be shared in the directory properties?

I know how to do it using graphical tools such as Nautilus, Konqueror, and Gnome's shares-admin, but I'd like to know how to do with via command line, because, once you know the commands, the command line is always quicker.

I guess you could say I'm looking for a command line method for sharing directories in much the same way that chmod sets permissions from the command line.

Thanks.

Matir 11-29-2010 11:25 PM

Do you mean sharing as in over the network, or among multiple users on your local system?

Network sharing is generally handled by Samba, whose configuration file is /etc/samba/smb.conf.

frankbell 11-30-2010 08:30 PM

I mean over the network. I have Samba up and running.

What I mean is this. If I want a directory to be configured to be share-able, I have to
  1. open, for example, Konqueror,
  2. find the directory,
  3. highlight it,
  4. right-click to bring up the menu,
  5. select properties,
  6. go to the sharing tab, and
  7. as root, tell the directory that I want it to be shared and how I want it shared.

What I want to learn how to do is to do that process via the command line--a command that would do for sharing what chmod does for permissions. (If I can do it in a file manager, I should be able to do it from the command line. Inquiring minds want to know.)

Then I can make the directory available over the network using Samba. I normally share multiple directories from my file server.

michaelk 11-30-2010 09:55 PM

There is no all in one command that will automatically create a shared directory. You need to edit the /etc/samba/smb.conf file. There are lots of howtos and typically several examples included via comments in the smb configuration file.


All times are GMT -5. The time now is 10:48 PM.