[solved] Samba password issue

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

[solved] Samba password issue

Postby c-m on Tue Feb 07, 2012 2:51 pm

Hi,

I have mint 11 server with 6 different shared folders. Music, Video, Pictures etc..

I have a mint netbook which i'm using as a client.

The netbook and the server both have a user with the same name and password.

For some strange reason I can't access some of the shares from my netbook. For example "Music" works fine, but "Video" just repeatedly asks for the username and password.

Despite me entering the same credentials as for the "Music" folder, samba just won't accept it.

This is driving me insane :x
Last edited by c-m on Tue Feb 07, 2012 3:37 pm, edited 1 time in total.
c-m
Level 3
Level 3
 
Posts: 112
Joined: Mon Aug 24, 2009 2:01 pm

Linux Mint is funded by ads and donations.
 

Re: Samba password issue

Postby altair4 on Tue Feb 07, 2012 3:02 pm

Need more information please. Post the output of these commands from the "Server":
Code: Select all
testparm -s

Code: Select all
net usershare info --long

Code: Select all
ls -dl $HOME/Music

Code: Select all
ls -dl $HOME/Videos
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 13
Level 13
 
Posts: 4664
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba password issue

Postby c-m on Tue Feb 07, 2012 3:10 pm

Thanks. Here goes


Code: Select all
testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Processing section "[Music]"
Processing section "[books]"
Processing section "[Pictures]"
Processing section "[stella]"
Processing section "[Videos]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
   server string = %h server (Samba, LinuxMint)
   security = SHARE
   encrypt passwords = No
   map to guest = Bad User
   obey pam restrictions = Yes
   pam password change = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   unix password sync = Yes
   syslog = 0
   log file = /var/log/samba/log.%m
   max log size = 1000
   dns proxy = No
   usershare allow guests = Yes
   panic action = /usr/share/samba/panic-action %d

[printers]
   comment = All Printers
   path = /var/spool/samba
   create mask = 0700
   printable = Yes
   browseable = No

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers

[Music]
   path = /media/Home/Music
   valid users = Belle, carl
   read only = No

[books]
   path = /home/carl/Documents/books
   valid users = Belle, carl

[Pictures]
   comment = Trip pictures
   path = /media/Home/Pictures/
   valid users = Belle, carl

[stella]
   path = /media/Home/stella
   valid users = Belle, carl
   read only = No

[Videos]
   path = /media/Home/Videos
   valid users = Belle, carl
   read only = No


Code: Select all
net usershare info --long
[videos]
path=/media/Home/Videos
comment=
usershare_acl=Everyone:F,
guest_ok=n




Code: Select all
ls -dl /media/Home/Music
drwxr-xr-x 83 carl carl 12288 2012-01-14 10:55 /media/Home/Music


Code: Select all
ls -dl /media/Home/Videos
drwxrwxrwx 6 carl carl 4096 2012-01-18 18:29 /media/Home/Videos
c-m
Level 3
Level 3
 
Posts: 112
Joined: Mon Aug 24, 2009 2:01 pm

Re: Samba password issue

Postby altair4 on Tue Feb 07, 2012 3:29 pm

There are a few things wrong with your setup.

[1] There are 2 different methods to create samba shares:

This is a Samba Classic share:
[Videos]
path = /media/Home/Videos
valid users = Belle, carl
read only = No

This is a Samba Usershare ( created from Nautilus )
[videos]
path=/media/Home/Videos
comment=
usershare_acl=Everyone:F,
guest_ok=n

Who can access that share is different between the 2 so I'd get rid of the Usershare by going into Nautilus and undoing the share.

[2] Your security level is also discombobulated.

Edit smb.conf as root:
Code: Select all
gksu gedit /etc/samba/smb.conf

Find and change these 2 lines:
security = SHARE
encrypt passwords = No

To this:
security = user
encrypt passwords = Yes


[3] Linux file permissions need to be modified in order for remote users to write "Music":
Code: Select all
sudo chmod 0777 /media/Home/Music


After all these changes restart samba:
Code: Select all
sudo service smbd restart

Wait about 5 minutes for the network to calm itself after a samba restart and see how far that got you.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 13
Level 13
 
Posts: 4664
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba password issue

Postby c-m on Tue Feb 07, 2012 3:36 pm

Works perfectly.Thanks
c-m
Level 3
Level 3
 
Posts: 112
Joined: Mon Aug 24, 2009 2:01 pm


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 4 guests