Sharity

Tips and Tricks

How to get help about all configuration options

Sharity is configured via the Graphic User Interface (GUI). Open the GUI window and change to section "Options". You will see a couple of options. Click the help button (the button with the question mark in the bottom left corner) for more information about these options.

Hint: The help button works in all sections of the GUI and shows a section specific help.

How to make a permanent mount

All mounts established with "sharity mount" from the command line or with the mounts dialog in the GUI vanish after a reboot. We do not recommend mounting in a startup script because it requires that a user's password is somehow stored on the machine.

There is a much more elegant solution. Use the automounter in /CIFS with a symbolic link. Say you want to have the share smb://server/share permanently available at the path /myshare, create a symbolic link like this:

ln -s /CIFS/share\[server\] /myshare

(Note that the square brackets must be escaped from the shell.) When a user comes to /myshare, the share is automatically mounted and the Sharity GUI brings up a password dialog (unless the user is already logged in or has a password stored).

How to prevent password dialogs

It may be annoying to type your password again and again. Sharity has a mechanism to prevent this: The keychain. Passwords for shares, servers and even for entire domains can be stored there.

Let's assume that you need to access a couple of servers and have the same password on all of them. You want to store the password in a way so that it is tried first for each login in your domain or workgroup. This can be arranged in the following way:

  1. Login to one server.
  2. Open the GUI and change to section "Logins".
  3. Select the login to the server in question and click "Add to Keychain".
  4. The GUI has switched to section "Keychain". Select the newly created record and choose "Make selected key the default for domain" from the "Actions" menu.

Please note: The procedure outlined above works only as described if the server identifies as member of a domain. Some servers don’t. If the "domain" property of the key is a single question mark, the server has not identified. In this case the key is made the default for all domains.

Hint: All this can be done from the command line as well. Here is an example:

sharity login -s smb://server
sharity keychain default smb://server

See "sharity man login" and "sharity man keychain" for details.

How to prevent password dialogs for all users

Sharity relays security semantics of CIFS to the user: All users who want to access a server must authenticate to this server. This may be inconvenient. Consider an environment where thousands of users need access to a public share. You don’t care about security since the share is read-only and contains public information anyway.

You can make all users go through the same account on the server. This is accomplished by storing the login in the keychain and then allow all users to use it. With the GUI, perform the following steps:

  1. Login to one server.
  2. Open the GUI and change to section "Logins".
  3. Select the login to the server in question and click "Add to Keychain".
  4. The GUI has switched to section "Keychain". Select the newly created record and choose "Publish selected key to all users" from the "Actions" menu.

If you need to use different accounts for some users, store passwords for them before you publish a key. Sharity always prefers more specific passwords in the keychain over more general ones.

The same effect can be achieved from the command line, e.g.:

sharity login -s smb://server
sharity keychain publish smb://server

See "sharity man login" and "sharity man keychain" for details.