You are not logged in.

#1 2016-04-30 13:05:21

GordonGR
Member
From: Thessaloniki, Greece
Registered: 2011-11-07
Posts: 276

[Solved] Unable to set samba

Hello everyone.

I am completely buffed. I am trying to set Samba (for the first time, since it went to version 4, because I didn't need it for a few years now), and I can't. When I try to access the share via Thunar, I get a box to enter username, hostname and password, and it will not connect in any of the ways: (a) anonymously (which I prefer), (b) with my user's username/password, which I have made also a samba user according to the wiki's instructions.

My /etc/samba/smb.conf, parsed by testparm -s, is:

[root@Russell nikos]# testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[public]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	server string = Russell
	workgroup = MSHOME
	log file = /var/log/samba/%m.log
	max log size = 50
	map to guest = Bad User
	security = USER
	dns proxy = No
	idmap config * : backend = tdb


[homes]
	comment = Home Directories
	browseable = No
	read only = No
	valid users = %S


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


[public]
	path = /shares
	guest ok = Yes
	guest only = Yes
	read only = No

Some help, please?

Last edited by GordonGR (2016-05-04 12:39:25)


Intel(R) Celeron(R) CPU E3400 @ 2.60GHz, x86_64. AURs.

“No one without the knowledge of geometry may enter.“ Plato.

Offline

#2 2016-04-30 14:18:22

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: [Solved] Unable to set samba

I set up my Samba instance ages ago and haven't touched it since, but looking at my config I think you need to define your guest user in the config file right? Also you need to make sure it exists in the samba database (pbdedit or whatever the recommended command is now) and that there is a linux user. The Linux account of course needs to have permissions on the directory you are accessing.

Beyond that if would be helpful to see what mount spits out when you use verbose logging and any server side logs that you come up with as well.

Offline

#3 2016-04-30 18:17:03

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 454

Re: [Solved] Unable to set samba

is the workgroup the same on the windows computer?

did you try to enter the windows username  and password?

ezik

Offline

#4 2016-05-03 12:16:07

GordonGR
Member
From: Thessaloniki, Greece
Registered: 2011-11-07
Posts: 276

Re: [Solved] Unable to set samba

Shulamy: The workgroup is the same and there is no Windows password (it's an old Windows installation, I believe it was set that way).

cris9288: The user does exist in the samba database, is a linux user and does have permissions on the directory. As for mount:

nikos@Russell:~$ sudo mount -t cifs //RUSSELL/shares/ /mnt//mountpoint -o user=nikos,password=nikoss,uid=nikos,gid=users,workgroup=MSHOME
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

nikos@Russell:~$ smbclient -L Russell -U%
Domain=[MSHOME] OS=[Windows 6.1] Server=[Samba 4.4.2]

    Sharename       Type      Comment
    ---------       ----      -------
    public          Disk     
    IPC$            IPC       IPC Service (Russell)
    psc_1200_series Printer   psc_1200_series
    psc_1200        Printer   psc_1200
Domain=[MSHOME] OS=[Windows 6.1] Server=[Samba 4.4.2]

    Server               Comment
    ---------            -------
    DOMINO               Domino
    RUSSELL              Russell

    Workgroup            Master
    ---------            -------
    MSHOME               DOMINO

Note: Domino is the Windows computer.

As for journalctl -b, all it says is:

nikos : TTY=pts/1 ; PWD=/home/nikos ; USER=root ; COMMAND=/usr/bin/mount -t cifs
_unix(sudo:session): session opened for user root by (uid=0)
_unix(sudo:session): session closed for user root


Intel(R) Celeron(R) CPU E3400 @ 2.60GHz, x86_64. AURs.

“No one without the knowledge of geometry may enter.“ Plato.

Offline

#5 2016-05-03 21:14:46

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: [Solved] Unable to set samba

GordonGR wrote:

Shulamy: The workgroup is the same and there is no Windows password (it's an old Windows installation, I believe it was set that way).

cris9288: The user does exist in the samba database, is a linux user and does have permissions on the directory. As for mount:

nikos@Russell:~$ sudo mount -t cifs //RUSSELL/shares/ /mnt//mountpoint -o user=nikos,password=nikoss,uid=nikos,gid=users,workgroup=MSHOME
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

nikos@Russell:~$ smbclient -L Russell -U%
Domain=[MSHOME] OS=[Windows 6.1] Server=[Samba 4.4.2]

    Sharename       Type      Comment
    ---------       ----      -------
    public          Disk     
    IPC$            IPC       IPC Service (Russell)
    psc_1200_series Printer   psc_1200_series
    psc_1200        Printer   psc_1200
Domain=[MSHOME] OS=[Windows 6.1] Server=[Samba 4.4.2]

    Server               Comment
    ---------            -------
    DOMINO               Domino
    RUSSELL              Russell

    Workgroup            Master
    ---------            -------
    MSHOME               DOMINO

Note: Domino is the Windows computer.

As for journalctl -b, all it says is:

nikos : TTY=pts/1 ; PWD=/home/nikos ; USER=root ; COMMAND=/usr/bin/mount -t cifs
_unix(sudo:session): session opened for user root by (uid=0)
_unix(sudo:session): session closed for user root

I think that your share name is actually //RUSSELL/public (  you also have an extra forward slash in your mount path in the command ) and not //RUSSELL/shares. /shares is the physical path on the disk. Your smbclient output tells you as much - notice that "shares" isn't listed under the Sharename column.

Offline

#6 2016-05-04 12:38:40

GordonGR
Member
From: Thessaloniki, Greece
Registered: 2011-11-07
Posts: 276

Re: [Solved] Unable to set samba

Solved!

Cris9288, you were right.

nikos@Russell:~$ sudo mount -t cifs //RUSSELL/public/ /mnt//mountpoint -o user=nikos,password=nikoss,uid=nikos,gid=users,workgroup=MSHOME
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Now, I tried adding my default user as nikos in smb.conf, as you said:

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
  guest account = nikos

and restarted smbd.service

nikos@Russell:/etc/samba$ sudo systemctl restart smbd

And… it connected!

nikos@Russell:~$ sudo mount -t cifs //RUSSELL/public/ /mnt//mountpoint -o user=nikos,password=nikoss,uid=nikos,gid=users,workgroup=MSHOME

Now Thunar can see the linux shares (Russell's, from network) without username/password, and also the windows machine (Domino) can see it, and read/write properly.

If I unmount

nikos@Russell:~$ sudo umount //RUSSELL/public/
[sudo] password for nikos:

then Thunar needs username/password, but it connects, while Windows connect without them (for some reason).

Anyway, issue solved, and I thank you both very much!


Intel(R) Celeron(R) CPU E3400 @ 2.60GHz, x86_64. AURs.

“No one without the knowledge of geometry may enter.“ Plato.

Offline

Board footer

Powered by FluxBB