'net usershare' returned error 255
listofx
listofx at gmail.com
Wed Jul 21 17:00:26 UTC 2010
On δΈ‰, 2010-07-21 at 12:26 -0400, Tom H wrote:
> On Wed, Jul 21, 2010 at 10:11 AM, listofx <listofx at gmail.com> wrote:
> >
> > 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/
> >
> > 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
> >
> > There is also a group called haldaemon in my system. (the last line in /etc/group)
> >> haldaemon:x:121:
> >
> > I have tried to find other files or directories owned by haldaemon with
> > intention to finally find out a package which causes a new user
> > haldaemon. Utilizing command 'find', I did not obtain any valuable
> > results.
> >
> >> xiang at xiang-laptop:/$ sudo find ./ -group haldaemon -print
> >> xiang at xiang-laptop:/$ sudo find ./ -user haldaemon -print
>
> The uid and gid are different from mine but haldaemon is a valid system user.
>
> Whether the haldaemon group is meant to "own" usershares, I have no
> idea. I have never used samba's usershares and have never set up samba
> through a GUI.
>
> I am pretty sure that I have seen someone post this error before and
> that the solution was to remove and add the user from the sambashare
> group before setting up a share.
>
haldaemon was introduced by hal, I found.
hal was introduced by arista, a program for video transcode. (10.04)
sudo apt-get --purge autoremove arista
will remove haldaemon in /etc/passwd and /etc/group.
But, arista is not the reason leading to fail. Installing arista(hal)
will not change the group owner of /var/lib/samba/usershares to
haldaemon.
There is a strong possibility that installing kubuntu-netbook over
ubuntu-netbook broke some setting in gnome (the fact,that I gave himself
a taste of kubuntu-netbook today, not mentioned above). Though I have
purged all related packages of kbuntu-netbook, I believe, now, it must
have dirty footprints left.
BTW, 'remove directory /var/lib/samba/usershares and reinstall samba'
has solved my problem.
Thanks, Tom
Best Regards
xiang
More information about the ubuntu-users
mailing list