Page 1 of 4

[solved ] access a SAMBA network folder

Posted: 02 Dec 2012, 21:56
by amplatfus
Hello,

I am looking to find a solution to access a network folder hosted on a USB external HDD mounted in a DD-WRT firmware router.
This folder is working to be mapped from Windows Xp and Windows 7 and was created using SAMBA in DD-WRT.

Now, if there is somebody who knows the solution, please reply.
I will searching in the meantime and post if I'll find the solution.

Thank you.
All the best to the best team.

Re: access a SAMBA network folder

Posted: 03 Dec 2012, 11:57
by brokenman
Are you using 32bit or 64bit Porteus?

modprobe cifs
mount.cifs //192.168.2.100/sharetest /mnt/pc -o user=nick,password=nack

Above uses cifs to mount a lan share.
IP is router
sharetest is name of shared folder
/mnt/pc is local mount point
nick is user on target box
nack is password on target box

Re: access a SAMBA network folder

Posted: 03 Dec 2012, 21:54
by amplatfus
brokenman wrote:Are you using 32bit or 64bit Porteus?

modprobe cifs
mount.cifs //192.168.2.100/sharetest /mnt/pc -o user=nick,password=nack

Above uses cifs to mount a lan share.
IP is router
sharetest is name of shared folder
/mnt/pc is local mount point
nick is user on target box
nack is password on target box
Dear brokenman,

Thank you for prompt post :)
I have tried using Porteus 1.2 32bit:

mkdir /mnt/pc
modprobe cifs
mount.cifs //192.168.2.100/mnt /mnt/pc -o user=nick ,password=nack

And receive:
mount error 22 = Invalid argument

I have also test:
mount.cifs //192.168.2.100/ /mnt/pc user=nick ,password=nack

Finally, it worked for me now:
mount.cifs //192.168.2.100/mnt /mnt/pc

I should save this one for backup reasons :)
Next step: I know it is possible, but I don't know how can I make it permanently, if you could suggest...it will be appreciated :)

Thank you for your post. Hope that will help others also, because I have search days before my post here... Now I am happy!
All the best!

[SOLVED] Re: access a SAMBA network folder

Posted: 04 Dec 2012, 06:38
by amplatfus
Dear brokenman,

I cannot believe it :)
I did it using a executable file in /root/.trinity/Autostart/ with

Code: Select all

mkdir /mnt/pc
mount.cifs //172.16.0.1/mnt /mnt/pc user=yourusername, password=yourpassword
What is strange, before that I have tried to mount samba folder using wrong password.
Guess what: is working. Mentioning that I am on root user.

All the best.

Re: access a SAMBA network folder

Posted: 04 Dec 2012, 15:49
by brokenman
Excellent. Glad you got it working.

Re: access a SAMBA network folder

Posted: 08 Jun 2013, 05:52
by amplatfus
brokenman wrote:Excellent. Glad you got it working.
Dear team,

Hope you are all well.
I started to test Porteus-2.1 RC1. And about mount.cifs: I have executed the upper scripts. But I get a error: mount error(38): Function not implemented. Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

When you have time, if you could reply. Or should post on Porteus-2.1 RC1 topic?

All the best to Porteus community :)
amplatfus

Re: access a SAMBA network folder

Posted: 08 Jun 2013, 17:27
by Hamza
amplatfus wrote:
Hamza wrote:

Code: Select all

mount -t cifs //192.168.0.1/opt -o username=your_username,password=**** /mnt/pc
Dear Hamza,

I have tried and is not working on my KDE Porteus v2.1 RC1. PS: I have a different IP, but is working in older Porteus KDE:

Code: Select all


root@porteus:~# mount -t cifs //172.16.0.1/opt -o /mnt/pc user=yourusername password=******
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.


Do you have the same Porteus KDE? Could be my IP?

Thank you for replying,
amplatfus
Please try this.

Code: Select all

mount.cifs "//X.X.X.X/path/to/folder" "/mnt/pc" -o username=your_username,password=your_password
If your client IP is in a different 'primary' range than the server's one, a router will be needed. That's how Internet Protocol works.

Re: access a SAMBA network folder

Posted: 08 Jun 2013, 19:44
by amplatfus
It is a router. And what have I tried at the first time, in the the same IP range with 17.16, same folder, it is working without any problems. I'm still searching and I will post any update.

Re: access a SAMBA network folder

Posted: 09 Jun 2013, 12:47
by amplatfus
brokenman wrote:Excellent. Glad you got it working.
Dear brokenman,

Please, did you know, CIFS has changed? Because, with the same infrastructure, with KDE 1.2 is working, but in recently KDE RC I am still Google it.

All the best to Porteus team,
amplatfus

Re: access a SAMBA network folder

Posted: 09 Jun 2013, 13:31
by wread
@amplatfus

Please, edit your post, adding [SOLVED] to the subject!

Regards!

EDIT: I understood the case was solved. Maybe this example can help you:

In my office I have a linux server to keep all the files from seven windows machines. For that I installed samba in the server.

Now I configured the seven machines to save our project files in the server. The server acts a remote hard disk that the seven machines can read and write, so all collaborators have access to the project files.

Now I come myself with my Porteus machine and want to have access to the same file server. I use nfs to connect to the server and edit the files with Porteus applications that can read the files made by windows applications.

This work for me...Maybe Net File System can solve your problem...

Cheers!

Re: access a SAMBA network folder

Posted: 09 Jun 2013, 16:52
by brokenman
A quick test showed me that this still works in standard porteus v2.1 without samba installed. Wread's solution above is certainly much more elegant and i would advise using his method if you want to interact and edit files. If you just want access to copy files to and from the machine then cifs is fast.

Code: Select all

mount.cifs //192.168.0.202/jay /mnt/win -o user=whoever,password=xxxxxxxxxx
Please try to ping the IP to make sure it is contactable. Then make sure that the folder name (after ip address) is valid and shared.

Re: access a SAMBA network folder

Posted: 09 Jun 2013, 18:52
by amplatfus
brokenman wrote:A quick test showed me that this still works in standard porteus v2.1 without samba installed. Wread's solution above is certainly much more elegant and i would advise using his method if you want to interact and edit files. If you just want access to copy files to and from the machine then cifs is fast.

Code: Select all

mount.cifs //192.168.0.202/jay /mnt/win -o user=whoever,password=xxxxxxxxxx
Please try to ping the IP to make sure it is contactable. Then make sure that the folder name (after ip address) is valid and shared.
Dear wread and dear brokenman,
sorry for misunderstanding. The issue is solved for Porteus KDE v1.2. What is happening in my fresh KDE v2.1 RC1:

Code: Select all

root@porteus:~# modprobe cifs
root@porteus:~# mkdir /mnt/pc
root@porteus:~# mount.cifs //172.16.0.1/opt /mnt/pc -o user=whoever,password=@xxxx
mount error(38): Function not implemented
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@porteus:~# ping 172.16.0.1
PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data.
64 bytes from 172.16.0.1: icmp_req=1 ttl=64 time=1.03 ms
64 bytes from 172.16.0.1: icmp_req=2 ttl=64 time=0.942 ms
Same commands, same IP/share/user/password are working fine in Porteus KDE 1.2. I guess I have to make a new clean instal of KDE 2.1 RC1.
But I will test NFS before. Dear wread, could you please give me some advice about where I can find it?

Thank you guys. I like the new KDE. This is the only issue for me, making me to keep (for the moment :)) the older KDE.
Best regards,
amplatfus

Edited: Searching NFS I have foud Mount drives/filesystems/shares in Application launcher. Please, should be for mapping a DDWRT Router HDD folder?
I have tried but :(
Thanks.
amplatfus

Re: access a SAMBA network folder

Posted: 09 Jun 2013, 20:24
by wread
@amplatfus
Try this other one: At home I have a Porteus desktop. This is my laptop. We are both connected to the same router.
Using "fish", I connect the desktop to my laptop, so that I can use the desktop as file "trunk". Take a look at that; the desktop is connected at 10.0.0.5 with my laptop at 10.0.0.7.
Image

You must start the ssh daemon on both machines to get connected. Make /etc/rc.d/rc.sshd excutable first (chmod +x ) and then start the daemon /etc/rc.d/rc.sshd start; that on both machines. Then you can go fishing...

Good luck :)

Re: access a SAMBA network folder

Posted: 09 Jun 2013, 21:09
by amplatfus
Dear @wread and dear @brokenman,

To be honest, it is not a big problem my issue, I still have old Porteus. But it stays in my mind until I will solved and more and that I like new look of Porteus KDE RC1.

I use other options, but my need is to mount this router folder.
Now, I am looking to understand. I found in the meantime this in log.smbd log from router:

Code: Select all

[2013/06/09 14:36:25, 0] source/passdb/pdb_smbpasswd.c:pdb_getsampwnam(1369) unable to open passdb database.
Could be a sign? My feeling is that I have to configure the samba from Porteus 2.1 KDE RC1. As far I remember, I made some custom settings in the samba on Porteus 1.2 KDE.

All the best and thank you for prompt support
amplatfus

Re: access a SAMBA network folder

Posted: 09 Jun 2013, 21:17
by Hamza
What's the output of these commands?

Code: Select all

file /etc/smbpasswd

Code: Select all

ls -la /etc/smbpasswd