Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access a share on windows from Linux 3

Status
Not open for further replies.

rene1000

IS-IT--Management
Apr 9, 2002
89
0
0
NL
Hello all,

is it possible to access a share on a windows 2000 server from a Linux server ? (i use redhat 7.2).

if so, how can this be done. just connecting to \\servername\sharename doesn't work.

thanks in advance
 
From the command prompt...

mount -t smbfs //windows_server/share_name /mount_point


ChrisP ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
thank you very much fluid11. this helps me a lot.
 
no prob:) ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
with the following command i can get acces to the share
on windows.

smbclient //windows_server/share -U username%password -W workgroup

but incase of

mount -t smbfs //windows_server/share /mount_point

i am promted for a password, even if i give the correct
password i get the following error message
6579: session setup failed: ERRDOS - ERRnoaccess (Access denied.)
SMB connection failed
 
If you need to specify a username, use this...

mount -t smbfs -o username=user //windows_server/share_name /mount_point

It will ask for the users password after you execute the command.


ChrisP ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
thanks fluid11, but how do i specify a user from a particular
workgroup
 
Users aren't stored in workgroups, only domains or local computers. If your trying to access a computer in a separate workgroup from your Linux machine, as long as the Linux machine can find the computers NetBIOS name, the command will work. If it can't resolve the name, you can always substitute the windows_server name with its IP address.

ChrisP ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
ok i want to use the user that has been created on the domain
which i can do using smbclient , how do i do the same incase
of mount.

smbclient //windows-server/share -U user%password -W domainname

 
You probably need your Linux computer to join the Windows domain if the above command doesn't work. Create a computer account in the domain with the same name as the Linux machine. If your using a Win2K domain, then make sure to select "All Pre-Windows 2000 Computers to use this account". After the computer account is created, run this command from the Linux box...

smbpasswd -j NetBIOS_name_of_domain -r NetBIOS_name_of_PDC

An example might look something like this...

smbpasswd -j microsoftsucks -r win2k01


ChrisP ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
why should i do all this i clearly said that i am able to login using smbclient with a specific user.
just tell me the option that has to be used with mount to specify the username password and the domain to which it belongs.
if u see smbclient command i use the -W option to do the same.
 
I never said you should do all of this. You asked me a question on how to do it with mount and I answered you. You should use whichever command you think is easier. I don't see why you even need to specify a domain anyway. The command I gave above should work whether a computer is part of a domain or a workgroup. I don't even think that my last post about joining the domain is necessary. I just connected to my DC from a Linux workstation that is not part of the domain without any problem using the mount command I've been talking about...

mount -t smbfs -o username=cpurcell //win2k-03/sysvol /mnt/smb

I don't have multiple Windows domains here to test it on, but I don't see why this wouldn't work on any of them.

ChrisP ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
I just found a better solution to your problem. You can specify the IP address of the server in the command using the -o ip='ipaddress' option. This is useful for when mounting across the internet since the mount command uses broadcasts to resolve names.

mount -t smbfs -o username=cpurcell,ip=24.111.29.35 //win2k-03/sysvol /mnt/smb

ChrisP ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
I use the following command to connect to a domain on a Win2k Advanced Server:

mount -t smbfs -o username=name,password=xyz //windows_server/share_name /mnt/mount_point

This allows me to successfuly log on to the domain. (The username and password are the ones from a valid account on the server.)

If I use MrRohan's solution:

smbclient //windows_server/share -U username%password -W workgroup

then the server kicks me. (Probabely because the -W option is for workgroups only, which is not the same as a domain.)

 
I'm guessing there is no solution to my problem. I have a machine I am trying to connect to with smbfs mounting. I have just added said machine to a domain that is not local to the network I am on, and now it can no longer login as the local windows user I had setup for the mount. When I try my domain account I get errors which seems to point to the fact there are no domain controller on this network for said domain, and so I cannot connect to the machine using smbclient or mount.

Is there any way around this problem?
 
the -W setting is good for workgroups or domains. I regularly use smbclient and mount from machines not in a domain to a foreign domain. Like when I'm at work and use my linux laptop to mount shares from my employers w2k domain. I use:
smbclient //server/share -Uname%pass -Wdomain
or
mount -t smbfs //server/share /mount/point -o username=user,password=pass,workgroup=domain

never any problems. HTH
 
Grimicus, please start a new thread with this problem. ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
mount -t smbfs //<IP_Address_Of_Wndows>/Shared_Drive -o username=<Username_Of Windows_Domain> /mnt/cdrom

It will prompt for a password of that user who has an account in the windows domain and has shared a directory.
Don't mention the name of the windows machine but the ip address.

Soumen
 
Hi,
I am also trying the same thing. Infact I want to use windows services for Unix 3.0 for my win2k servers, ws and linux boxes. I have installed SFU3.0 on one of the server. I have already tried all the commands from the linux box but all gave me the errors. The error i am getting are those:

1. when i run the mount -t smbfs command with server name, it gives me the error share not found. Although i shared the folder on the win2k server with both NFS sharing and windows sharing.

2. When i run the mount -t smbfs command with server IP, it gives me the error that &quot;26667: session request to <IP> failed(called name not present). The ask for password and then says failed.

I really appriciate if someone has used windows services for Unix 3.0 and he can tell me a complete senario that how windows and linux can shared their files and use same password to logon to the domain and resources. tht what MS says in SFU3.0 but how , i need to know?
appricaite
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top