Content-type: text/html
ws.conf
Section: Misc. Reference Manual Pages (5) Updated: January 1, 2008 Index
Return to Main Contents
NAME
ws.conf - The configuration files for ws (WinShares)
SYNOPSIS
When running ws for the first time, a directory named ~/.ws and a file named ~/.ws/ws.conf are created.
ws -c allows to edit or create a new ws.conf using vi (or another editor).
Another configuration file named /etc/ws.conf exists, and can have the power to override the user ws.conf, but only root can change his configuration.
FILE FORMAT
/etc/ws.conf file is the system configuration file and the ws.conf file created by each user is the user configurarion file.
Both are equal in the way they are configured but /etc/ws.conf has one more variable: override.
If override=1, /etc/ws.conf takes precedence over ~/.ws/ws.conf. If override=0, it is ~/.ws/ws.conf which is used by WinShares.
When there is no ~/.ws/ws.conf, the new ws.conf created with "ws -c"
command is copied from the /etc/ws.conf, allowing the administrator, to
control
the way users create the default configuration file. If /etc/ws.conf
don't exist, the new user configuration file is created hardcoded by
winshares.
The file is divided in two sections: The variables section and the servers section.
The character # comments the line after the sign.
To help you configure your ws.conf, you can read also some examples in ws.conf.example file.
The variables section has several variables that
contains values which can be changed by each user. If you change the
values don't forget to place them between doublequotes "".
This section ends with a return command that must not be deleted or commented.
- MYEDITOR
-
This variable contains /bin/vi, but you can change it to you favorite editor.
- WORKGROUP
-
This variable forces ws to mount only servers belonging to the
workgroups you chose, ignoring all other domains or workgroups in the
local network. If it is empty, it allows servers from other workgroups
to be mounted.
If the names (or name) specified are preceded by a colon (ex:
WORKGROUP=":domain1, :domain2"), it denies to use those workgroup
names. All the others are allowed.
We can define one or more workgroup names separated by a comma (ex: WORKGROUP="domain, domain1, domain2").
- OPTIONS
-
This is the options mount.cifs can use (see man mount.cifs). The default value is OPTIONS="noperm, nobrl".
- AUTO
- The default is "no" or "". If "yes", ws runs
automatically when you login. But, before, you need prepare the system
to use it. So, as root, use ws-auto on (read documentation).
- LOG
-
The default value is "" (empty). If "yes", a logfile ~/.ws/ws.log is created and messages added to it. Useful for debugging.
- LINKNAME
-
Is the mount directory and softlink name chosen by the user.
The servers section (after return line), has 3 sub-sections:
allow_only, deny and hidden.
Each sub-section name is surrounded by brackets, and the lines after
each one contains name servers and share servers with an optional
parameter U=.
This parameter has a value name%password or, instead, has a name that points to a authentication file (created by ws -a name) that contains a username and password.
This sub-sections are:
- [allow_only]
-
If this section contains data, it means we only want to mount the shares or servers specified there.
All the others shares or servers found in the network are ignored.
- [deny]
-
If this section exists or contains data, it means the shares or servers specified here are excluded from being mounted.
- [hidden]
-
This section specifies the shares that are "hidden" and we want to
mount. Here we can also include the servers or shares that belongs to
other subnets and are not scanned automatically.
The servers or shares names that we wish to allow or exclude from being mounted are written in the sub-sections with the sintax:
- domain/server/share
-
- If the first name starts with a digit, it means it is domain name.
- /server
- - If it has a slash in the left, it is a
server name. You must use Netbios names. DNS names are not accepted. IP
numbers are also accepted and fastest to mount.
- /server/share
-
- If it is between slashes with another name in the right, it means a server with a share.
Each server or share can contain a U= parameter. This is
intended to allow to mount a server or share that has a different
username and password to be authenticated. So, you can authenticate the
share or server indicating a username and password with a % between the words (U=username%password).
If we don't write the signal % it means it is pointing to an authentication file with that name, that contains the username and password.
This exists to allow editing the configuration file, without showing
the password in plain text to other people looking to your monitor.
EXAMPLES
- WORKGROUP="mydomain, domain2"
-
# this only allows to use servers from "mydomain" and "domain2"
- WORKGROUP=":domain1, :dom3"
-
# this denies to use servers from "domain1" and "dom3"
- [allow_only]
-
- ville/mathserv
-
# Only allow mount all the shares from mathserv server in the workgroup ville.
- [allow_only]
-
- /manager/statistics
-
# Only allow to mount the share statistics from manager server.
- /manager/works
-
# Only allow to share works share from manager server. All other shares would not be mounted.
- [allow_only]
-
- /manager/works U=john%99nine
-
# Only allow works share from manager server be mounted with username=john and password=99nine
- [allow_only]
-
- /manager/works U=work
- # Only allow works share from
manager server be mounted with username and password contained in the
file "work". Previously, the name and password were included in the
file with "ws -a work"
- [deny]
-
- /finances/sec02
-
# sec02 share is exclude to be mounted.
- /traffic
-
# traffic server is not mounted.
- [hidden]
-
- /mathserv/secure
-
# secure share in mathserv server, although it is a hidden share, is going to be mounted.
- /192.168.2.4
-
# Mount the server 192.168.2.4 with all his shares, belonging to another subnet.
- /192.168.1.3/math U=nick
- # Mount the share "math" in
the server 192.168.1.3 with the username and password contained in nick
file. The IP number used instead of the name, is fastest to mount
instead of using the name server.
NOTESThe ~/.ws directory contains "ws.conf", the default
authentication file, ws.log (the optional logfile) and all the others
authfiles the user has created.
Root is not allowed to run ws
(unless root changes the ws variable ROOTFORBIDDEN=0).
SEE ALSO
ws(1), ws-utils(8), mount.cifs(8), umount.cifs(8)
Read a ws.conf example in DOCS directory, named ws.conf.example.
AUTHOR
M.Carreira Silva
REPORTING BUGS
Report bugs to <mcls@users.sourceforge.net>.
Web: http://winshares.sourceforge.net/
COPYING
Copyright (C) 2007-2008 M.Carreira Silva.
Ws comes with NO WARRANTY, to the extent permitted by law.
This is free software and you may redistribute copies under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING.
Index
- NAME
-
- SYNOPSIS
-
- FILE FORMAT
-
- EXAMPLES
-
- NOTES
-
- SEE ALSO
-
- AUTHOR
-
- REPORTING BUGS
-
- COPYING
-
This document was created by
man2html,
using the manual pages.
Time: 17:16:42 GMT, January 19, 2008
|