PPRuNe Forums - View Single Post - Mepis and networking
View Single Post
Old 10th Apr 2007, 19:26
  #5 (permalink)  
Mac the Knife

Plastic PPRuNer
 
Join Date: Sep 2000
Location: Cape Town
Posts: 1,898
Received 0 Likes on 0 Posts
Hmmm... Just checked this out on SimplyMepis 6.0 and Keef is correct, there is a problem with user-based file sharing through Samba - I don't think it's actually a Mepis problem but I've emailed Warren about it.

I have a solution though, which is probably THE solution - here we go.

First of all, when it sets up, SimplyMepis defaults to simple file sharing a la XP (and Win98), with no authentication - what you share, you share with everyone and everyone can write to your shared directory. This is convenient but not very secure and is made worse because, for some bizarre reason, Mepis (like a lot of Linuxes) shares your Home directory (My Documents in Linus-speak) rather than a separate specific "Shared" directory.

This can be easily changed though, using the Mepis SAMBA configuration, which I actually find pretty straightforward. So far, so good.

Obviously just as in Windows, you need to set the same Workgroup, but that's taken care of in the configuration menu.

Going over to "Advanced" or user-based file sharing means creating a means of authentication - on a simple peer-to-peer network Windows merely authenticates you against the list of registered users of the machine, Linux however works differently.

In Linux you need to maintain a database of users, together with their access control rules. This database can be in various forms depending on whether you are using a small office network or a big enterprise. Previously the smbpasswd system was used and you just used the SAMBA control panel to add a new user. For simplicity's sake I always use my Windows logon/password pair.

For technical reasons Ubuntu (on which Mepis is based - out of Debian) seems to have recently moved over to preferring the tbdsam password backend to the smbpasswd backend and there is a bug.

The bug is that now the Add User panel doesn't work - you add a user and password but the user does NOT get added to the tdbsam database. So you're shafted, you can't work Samba with user-level access. This seems to have stopped a lot of people dead and I had to do quite a bit of poking around to find the answer.

The solution is to use the pdbedit command in a root terminal to add the user you want.

"The pdbedit program is used to manage the users accounts stored in the sam database and only be run by root. The pdbedit tool uses the passdb modular interface and is independent from the kind of users database used (currently there are smbpasswd, ldap, nis+ and tdb based and more can be added without changing the tool). There are five main ways to use pdbedit: adding a user account, removIng a user account, modifing a user account, listing user accounts, importing users accounts."

To see the list of users: pdbedit -L

To add Keef:
pdbedit -a -u keef
and pdbedit will popup and ask you for a password for keef - supply one and it's done - user keef created.

To see syntax: pdbedit -h

I'm not sure exactly where the bug is, in kcontrol (the KDE frontend)[does Gnome have the bug?], or Ubuntu , or even Debian itself, but wherever it is I hope it gets fixed quick 'cos that is the sort of thing that should never happen and gives Linux a bad name.

But at least there's an answer!



Mac
Mac the Knife is offline