Have you tried sharing a folder in Linux, especially in OpenSuse? If you open your File Browser/Nautilus and you right clicked on a folder, you will see a “Sharing Options” and when you try to share a folder and hit on the “Create Share” button, there’s an error prompting at the window: ‘net usershare’ returned error 255: net usershare: usershares are currently disabled.
Well the solution to this problem is quite simple:
Note: Before starting make sure that Samba is already installed and that the Samba daemon are already started:
Starting the Samba daemon
As root:
rawswift:~ # /etc/init.d/smb start Starting Samba SMB daemon done rawswift:~ #
Now here’s what you will do next (as root):
- Edit ‘/etc/samba/smb.conf’.
rawswift:~ # vi /etc/samba/smb.conf
add the following under the “[global]” category:
usershare allow guests = Yes usershare max shares = 100 usershare owner only = False
- Create the ‘usershare’ directory (this is where Samba will store the lists of shared folders).
rawswift:~ # mkdir /var/lib/samba/usershares rawswift:~ # chgrp users /var/lib/samba/usershares/ rawswift:~ # chmod 1770 /var/lib/samba/usershares/
- Then finally, restart Samba daemon:
rawswift:~ # /etc/init.d/smb restart Shutting down Samba SMB daemon done Starting Samba SMB daemon done rawswift:~ #
That’s it! Simple, eh?
Share a folder
- Open your file browser/Nautilus.
- Right click the folder you want to share.
- Click ‘Sharing Options’.
- Tick ‘Share this folder’ and ‘Guest access (for people without a user account)’.
- And hit ‘Create Share’ button.