LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Access windows shares from linux computer (https://www.linuxquestions.org/questions/linux-server-73/access-windows-shares-from-linux-computer-718406/)

jbrutch 04-11-2009 07:59 AM

Access windows shares from linux computer
 
Noob disclaimer: I only have a little bit of linux experience, so please, bare with me. :)

I recently got a laptop from a friend of mine and I installed ubuntu linux on it. So far I have pretty much everything that I want working on it, except for accessing windows shares.

I have windows vista 32 bit on my desktop computer with service pack1. I set up a share on there, and want to be able to access it with this laptop. If I go to places>network and then open up windows network. I get nothing. I've tried to mount the share using the smbmount command and it asks for a password and then just hangs up and does nothing.

How can I tell if this is an issue with the laptop, or if I'm doing something wrong trying to share the files on my vista machine (I'm not very familiar with vista yet)

I tried to search through the forum for help, but I didn't find anything that helped make this work. Any help is greatly appreciated. Thanks a ton

Retrievil_Knievil 04-11-2009 08:19 AM

Ok, how far have you got it working? :)

1. Can you access the share from another Windows Machine? Or from the Vista Machine?

2. Which mount options did you use? You can specify the user/password like this:

smbmount //vistapc/shared /mnt/share -o username=user,password=pass,rw

3. If you need to give a user access, you could add permissions like this:

smbmount //vistapc/shared /mnt/share -o username=user,password=pass,rw,uid=user

4. Firewalls and IPTables? Try disabling both before attempting to mount the share, and see if it works wothout them. Then activate and check the rules.

cj_cheema 04-11-2009 08:21 AM

Commands for checking shares
 
Hi
Well I'm not sure whether Vista support samba or not
but yes you can do one thing for checking it first of all create a user id in linux machine add it in samba with the help of smbpasswd
eg. smbpasswd -a <userid>


<userid> is any user id which you created it by useradd command
the smbpasswd command will prompt you to set <userid> password

share your vista local drive and from Linux box issue this command
smbclient -L //<windows_machine_ipaddress>/ -U <userid>

after issuing this above command smbclient will prompt you the password for this id put it. If vista supports smb protocol and your samba is working fine then windows share should display in your linux machine.

Regards
Charanjit Singh

cj_cheema 04-11-2009 08:44 AM

Got some solution...
 
Hi I was searching through net for your mentioned problem I got a good link related to your query hope it will help you please click on below link.

http://social.msdn.microsoft.com/For...-4136492483b0/

Regards

Charanjit Singh

jbrutch 04-12-2009 08:21 AM

Quote:

Originally Posted by Retrievil_Knievil (Post 3505434)
Ok, how far have you got it working? :)

1. Can you access the share from another Windows Machine? Or from the Vista Machine?

2. Which mount options did you use? You can specify the user/password like this:

smbmount //vistapc/shared /mnt/share -o username=user,password=pass,rw

3. If you need to give a user access, you could add permissions like this:

smbmount //vistapc/shared /mnt/share -o username=user,password=pass,rw,uid=user

4. Firewalls and IPTables? Try disabling both before attempting to mount the share, and see if it works wothout them. Then activate and check the rules.

1. I didn't have another windows machine at the time to try to access the shares on, but I do know that the problem wasn't with the laptop now. I set up a different windows xp computer with some shares, and the laptop found them immediately.

2. I did try exactly what you just shared with me with pretty much no luck.

3. didn't make any sort of a difference either.

4. I pretty much disabled anything that I thought might be blocking the way. nothing was protecting the vista machine and it still wouldn't work.

Honestly, I'm incredibly disappointed with Vista. This isn't the first problem that I've run in to with it. I tried to give it a chance, and I've been playing with it for too long now. I'm thinking that the machine that has vista on it is going to be downgraded to a windows xp machine again (the shares work great from windows xp) and I wont be going back to windows until they figure out something that plays nice.

Thank you much for the help, but I think I'm going to retreat back to what I know works well. Maybe eventually I'll get the guts to just install linux on the machine and cast windows out of my house for good.

Retrievil_Knievil 04-12-2009 11:27 AM

One other option, which is the way I do it myself, is to just set up Samba on one of your Linux boxes, and share stuff through that box in stead. I have had very few issues connecting to a Samba share from a windows machine, and I have always been sceptical to share files or run any kind of server from a MS box anyway. (Even the server editions have seemed like a joke to me since I discovered *nix).

Must say I am agreeing wholeheartedly with your opinion on Vista though. I bought the x64 Ultimate edition when it came out, and I have had it installed as a dual boot on my main machine since then, but six months ago I just deleted the partition. I had used it 10-15 times in total for the time it had been installed, and 90% of the time used in the OS was updating software.

If you DO decide to go 100% *nix though, check out VMWare Converter and VMWare Player. With them, you can turn a normal machine (i.e. your windows desktop) into a virtual machine, and store it on the same box. Then you boot Linux, and start the Windows OS as a VM. This gives you the best of both worlds, you can have a stable environment to do 99% of your tasks in, and then "boot" the virtual machine in a window (or fullscreen, to make the illusion complete :) ) when you need access to those windows apps that have not found their way to Linux yet. This works perfectly for me, I hardly notice that the Virtual XP is running slower than before, and just to be able to "reboot" Windows without shutting everything I work with down is a dream come through for me. (Also, since I already paid for the stuff, I thought I might as well put it to good use..:) )


All times are GMT -5. The time now is 10:02 AM.