'net usershare' returned error 255

Marlon yodatsi at gmail.com
Thu Jul 22 17:44:00 UTC 2010


Yo!!

sudo gedit /etc/samba/smb.conf

put some lines in the end

[MYFOLDER]
  path = /home/tony/shares
  guest ok = yes
  browseable = yes
  read only = no
  writeable = yes
  create mask = 0756
  force create mode = 0756

#///////

explanation

MYFOLDER is the name that will apear when you browse in windows...

path : is the whole path to the folder
guest ok: allows everyone to access
browseable: shows the folder when you opens the parent one
mask is the permissions that the files puted by a windows machine will put
in the write mode...


after all

sudo /etc/init.d/samba restart


if occours some errors, sudo apt-get install samba


cheers


Marlon Valério
┌──────────────┐
   T0ddy Stone Brains
└──────────────┘



2010/7/21 NoOp <glgxg at sbcglobal.net>

> On 07/21/2010 07:11 AM, listofx wrote:
> > Hi,
> >
> > I want to share a directory to friends. I do remember that it has once
> > worked before in nautilus just by right-clicking on a directory.
> >
> > but now, it prompts:
> >
> >>         'net usershare' returned error 255: net usershare: cannot open
> >>         usershare directory /var/lib/samba/usershares. Error
> >>         Permission denied
> >>         You do not have permission to create a usershare. Ask your
> >>         administrator to grant you permissions to create a share.
> >>
> >
> > ls -ld /var/lib/samba/usershares told me
> >>         drwxrwx--T 2 root haldaemon 4096 2010-07-21 21:12 usershares/
>
> $ ls -ld /var/lib/samba/usershares
> drwxrwx--T 2 root sambashare 4096 2010-07-12 20:50
> /var/lib/samba/usershares
>
> $ ls -la /var/lib/samba/
> total 280
> drwxr-xr-x   5 root root        4096 2010-03-03 12:55 .
> drwxr-xr-x 106 root root        4096 2010-07-08 17:48 ..
> -rw-------   1 root root       16384 2009-10-03 20:33 account_policy.tdb
> -rw-------   1 root root       77824 2009-10-03 20:33 group_mapping.ldb
> -rw-------   1 root root        8192 2009-10-03 20:33 ntdrivers.tdb
> -rw-------   1 root root         696 2009-10-03 20:33 ntforms.tdb
> -rw-------   1 root root       20480 2010-07-21 09:27 ntprinters.tdb
> -rw-------   1 root root       36864 2010-07-18 10:19 passdb.tdb
> drwxr-xr-x   2 root root        4096 2009-10-03 20:33 perfmon
> drwxr-xr-x  10 root root        4096 2009-10-03 20:33 printers
> -rw-------   1 root root       36864 2009-11-18 19:20 registry.tdb
> -rw-------   1 root root       24576 2009-10-03 20:33 secrets.tdb
> -rw-------   1 root root       36864 2010-07-18 21:10 share_info.tdb
> drwxrwx--T   2 root sambashare  4096 2010-07-12 20:50 usershares
> -rw-r--r--   1 root root         696 2010-03-03 12:55 winbindd_idmap.tdb
>
> sambashare:x:132:<user1>,root,<user2>
>
> >
> > I consider the group haldaemon is highly suspicious since it is located
> > after user 'upload' (see below) I created for uploading. see vipw below.
> > Who created this user?
> >
> >>         xiang:x:1000:1000:Xiang Liu,,,,:/home/xiang:/bin/bash
> >>         privoxy:x:114:65534::/etc/privoxy:/bin/false
> >>         ftp:x:1001:65534::/home/ftp:/bin/false
> >>         upload:x:1002:65534::/home/upload:/bin/false
> >>         haldaemon:x:115:121:Hardware abstraction
> layer,,,:/var/run/hald:/bin/false
>
>
> haldaemon:x:107:114:Hardware abstraction
> layer,,,:/home/haldaemon:/bin/false
>
> >
> > There is also a group called haldaemon in my system. (the last line in
> /etc/group)
> >>         haldaemon:x:121:
>
> Normal. haldaemon is used for:
> $ id haldaemon
> uid=107(haldaemon) gid=114(haldaemon)
>
> groups=114(haldaemon),24(cdrom),25(floppy),46(plugdev),104(scanner),115(powerdev)
>
>
> But I've no idea why your usershares are assigned to that group.
>
> ...
>
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100722/8fee562c/attachment.html>


More information about the ubuntu-users mailing list