Hello,
I'm writing here after having wasted literally tens of hours of time on this issue. I've searched the web, read tutorials and manuals, experimented, reinstalled, and so on... for weeks now.
All I want to do, is create a simple file server where I can put all the files I want to use from all my computers (4 for now, 3 with Linux and 1 with Windows XP).
Every user must have a share just for himself (not readable/browsable by others). And there must be at least 2 shares where a given set of users can all read/write/delete/whatever.
As most users of these computers are not "computer-literate", I want a simple way to graphically see the available shares, click on them, give their username/password, and have it mounted (if they're authorized of course).
At first I bought a NAS, thinking it would be really simple to set up. I used it with smb4k, which I like because it's intuitive. You can see all the shares, click, and connect to them.
But the NAS didn't do exactly what I wanted, and was a nightmare to configure, having a limited web interface. It was especially limited about setting writing permissions to different users on a single share.
And for every setting not present on the web interface, I had to set up scripts to change them again at every reboot, because the changes got lost at power down.
So I built a bare-bone new system just for that purpose, spending time and money. I installed the latest Kubuntu on it, and set it up so that it doesn't start X at boot (after all it's not needed, it only has to serve files, and while I need X for configuring it, I prefer it to run as "lean" as possible during regular use).
I set up ssh to be able to manage it remotely. And this all works well. The system is stable, and I can control it remotely from here.
Before going on, I'm posting here the smb.conf of the server:
and of the client:
I have modified the folders on the server's HD so that they belong to the user who will have to use them:
The users currently configured are cristian, selene and mp3. The shares are C_Cristian, belonging to cristian; S_Selene, belonging to selene; and M_Music, belonging to mp3 but "open" r/w to everyone.
But configuring samba is a nightmare. I can't do what I need to. As it is now (and I'm close to just admitting defeat, and throwing everything out of the window and buying some web-space somewhere), I can open smb4k, see the server and all the shares.
If I click on my private share, it asks for username and password (as expected) and accepts them. So it mounts the share. And this is the only share that "seems" to be OK.
If I click on the private share of another user, it asks for usr and pwd, but doesn't accept them. It doesn't accept *any* usr and pwd, even those of the legitimate owner of the share.
If I click on one of the "shared" shares - the one where several users must have access - it only accepts *my* usr and pwd, and not the others; but even then, after mounting it, I have no write access on it.
Abandoning smb4k to experiment, if I run
it asks for the password and gives this error:
I tried adding the domain name, both of the client
and of the server
but nothing changes. Still the same error.
I would like to try using smbfs instead of cifs, because I heard it's more stable (and because I was using it on Kubuntu 7.10), but in 8.04 smbfs seems to be just a "symlink" to cifs. I couldn't find a way to use (or install) smbfs, as it says it's already installed and current.
Any help to sort the problem would be *very* welcome. I wonder if it's just plain difficult to set up samba, or if there's some problem with Kubuntu 8.04...
Thanks in advance,
Cristian (frustrated).
I'm writing here after having wasted literally tens of hours of time on this issue. I've searched the web, read tutorials and manuals, experimented, reinstalled, and so on... for weeks now.
All I want to do, is create a simple file server where I can put all the files I want to use from all my computers (4 for now, 3 with Linux and 1 with Windows XP).
Every user must have a share just for himself (not readable/browsable by others). And there must be at least 2 shares where a given set of users can all read/write/delete/whatever.
As most users of these computers are not "computer-literate", I want a simple way to graphically see the available shares, click on them, give their username/password, and have it mounted (if they're authorized of course).
At first I bought a NAS, thinking it would be really simple to set up. I used it with smb4k, which I like because it's intuitive. You can see all the shares, click, and connect to them.
But the NAS didn't do exactly what I wanted, and was a nightmare to configure, having a limited web interface. It was especially limited about setting writing permissions to different users on a single share.
And for every setting not present on the web interface, I had to set up scripts to change them again at every reboot, because the changes got lost at power down.
So I built a bare-bone new system just for that purpose, spending time and money. I installed the latest Kubuntu on it, and set it up so that it doesn't start X at boot (after all it's not needed, it only has to serve files, and while I need X for configuring it, I prefer it to run as "lean" as possible during regular use).
I set up ssh to be able to manage it remotely. And this all works well. The system is stable, and I can control it remotely from here.
Before going on, I'm posting here the smb.conf of the server:
Code:
[global] encrypt passwords = true name resolve order = hosts wins bcast server string = socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192 announce version = 5.0 syslog only = yes username map = /etc/samba/smbusers null passwords = yes printcap name = CUPS passdb backend = tdbsam wins support = yes read only = no restrict anonymous = no domain master = no preferred master = no max protocol = NT acl compatibility = winnt ldap ssl = No server signing = Auto security = share ; General server settings ; NOTE: Inside this place you may build a printer driver repository for ; Windows - I'll cover this topic in another HOWTO. [print$] path = /var/lib/samba/printers guest ok = yes write list = root create mask = 0664 directory mask = 0775 [printers] path = /tmp printable = yes guest ok = yes browseable = no [C_CRISTIAN] path = /data/C_Cristian/ valid users = cristian admin users = cristian [S_SELENE] path = /data/S_Selene/ admin users = selene valid users = selene [M_MUSICA] path = /data/M_Music/ guest ok = yes comment = Tutta la musica valid users = cristian,selene,mp3 admin users = cristian,selene,mp3
Code:
# # Sample configuration file for the Samba suite for Debian GNU/Linux. [global] ## Browsing/Identification ### workgroup = WORKGROUP server string = %h server (Samba, Ubuntu) dns proxy = no #### Debugging/Accounting #### # This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%m # Cap the size of the individual log files (in KiB). max log size = 1000 # We want Samba to log a minimum amount of information to syslog. Everything # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log # through syslog you should set the following parameter to something higher. syslog = 0 # Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d ####### Authentication ####### # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. encrypt passwords = true # If you are using encrypted passwords, Samba will need to know what # password database type you are using. passdb backend = tdbsam obey pam restrictions = yes ; guest account = nobody invalid users = root # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. unix password sync = yes # For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for # sending the correct chat script for the passwd program in Debian Sarge). passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. pam password change = yes # This option controls how nsuccessful authentication attempts are mapped # to anonymous connections map to guest = bad user ############ Misc ############ # Most people will find that this option gives better performance. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html # for details # You may want to add the following on a Linux system: # SO_RCVBUF=8192 SO_SNDBUF=8192 socket options = TCP_NODELAY # Allow users who've been granted usershare privileges to create # public shares, not just authenticated ones usershare allow guests = yes #======================= Share Definitions ======================= [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700 # Windows clients look for this share name as a source of downloadable # printer drivers [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no
Code:
drwxr-xr-x 2 cristian cristian 4096 2008-05-05 19:16 C_Cristian drwx------ 2 root root 16384 2008-05-05 00:36 lost+found drwxr-xr-x 3 mp3 mp3 4096 2008-05-05 18:19 M_Music drwxr-xr-x 2 selene selene 4096 2008-05-05 17:56 S_Selene
But configuring samba is a nightmare. I can't do what I need to. As it is now (and I'm close to just admitting defeat, and throwing everything out of the window and buying some web-space somewhere), I can open smb4k, see the server and all the shares.
If I click on my private share, it asks for username and password (as expected) and accepts them. So it mounts the share. And this is the only share that "seems" to be OK.
If I click on the private share of another user, it asks for usr and pwd, but doesn't accept them. It doesn't accept *any* usr and pwd, even those of the legitimate owner of the share.
If I click on one of the "shared" shares - the one where several users must have access - it only accepts *my* usr and pwd, and not the others; but even then, after mounting it, I have no write access on it.
Abandoning smb4k to experiment, if I run
Code:
sudo mount -t cifs //192.168.1.3/M_Music /home/cristian/mp3 -o user=mp3
Code:
mount error 13 = Permission denied Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
Code:
sudo mount -t cifs //192.168.1.3/M_Musica /home/cristian/smb4k/sel -o user=P4-Kubuntu804/mp3
Code:
sudo mount -t cifs //192.168.1.3/M_Musica /home/cristian/smb4k/sel -o user=server/mp3
I would like to try using smbfs instead of cifs, because I heard it's more stable (and because I was using it on Kubuntu 7.10), but in 8.04 smbfs seems to be just a "symlink" to cifs. I couldn't find a way to use (or install) smbfs, as it says it's already installed and current.
Any help to sort the problem would be *very* welcome. I wonder if it's just plain difficult to set up samba, or if there's some problem with Kubuntu 8.04...
Thanks in advance,
Cristian (frustrated).
Comment