LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to connect to computers via command line? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-connect-to-computers-via-command-line-419627/)

Micro420 02-25-2006 11:06 PM

How to connect to computers via command line?
 
How do you connect to other computers via the command line? Specifically, connecting to shared folders. I am familiar with it in Windows as we use the 'net use' command. What is the equivalent of this in Linux (SuSE 10.0)?

Thanks

cs-cam 02-26-2006 12:43 AM

smbmount - need to have Samba installed.

randyding 02-26-2006 12:59 AM

Create a file in your homedir called .credentials
Code:

username = randyd
password = your_smb_password

Code:

mount -t smbfs -o credentials=/home/randyd/.credentials,uid=randyd,gid=randyd,workgroup=workgroup,ttl=5000 //localhost/randyd_shared /home/randyd/mnt

Micro420 02-26-2006 12:06 PM

**EDIT: I wanted to add that I am able to access my Windows Server 2003 box fine via KDE GUI by clicking on the Network Browsing icon. I need to know how to do this via command line if and when I SSH into my box remotely.

Thanks for the replies. It's slowly starting to come back to me about how to use the smbmount command. I tried to connect to my Windows Server 2003 but received this error:

Code:

cli_negprot: SMB signing is mandatory and we have disabled it.
7070: protocol negotiation failed
SMB connection failed

I used this command as root:

smbmount //ipaddress/sharefolder /home/micro420/share username=myname password=mypassword

I recall that I had to change something in my Group Policy on my Windows Server 2003 to get this to work. Any ideas????

Thanks again

randyding 02-26-2006 08:54 PM

The smbmount you tried is missing the -o to start the options, and each option must be separated by ',' with no spaces. If that syntax did not give an error then I'm surprised because I didn't think you could do it that way.
Specify the uid and gid options otherwise root will own the files in the share.
For performance its nice to increase the ttl to a larger than default value like 5000.
Do you get the same error when running the command in my previous post?

Micro420 02-26-2006 10:44 PM

1) I created a credential file in my home folder, /home/ken/.credential
Its name is credential
2) I then did:

Code:

linux:/home/ken # mount -t smbfs -o credentials=/home/ken/.credentials,uid=ken,gid=ken,domain=test.com,ttl=5000 //192.168.0.102/music /home/ken/test
Nothing happened. :( It just got stuck and I had to Ctrl+Z to break out of it. Very odd!

randyding 02-26-2006 11:01 PM

Let it go for 30-60 seconds, then check syslog and see if an error like this appears.
I get a timeout too on my home computer. I'll check the office computer because I know it works there and see what I'm doing different (maybe).
Code:

Feb 25 23:52:02 localhost kernel: smb_retry: no connection process
Feb 25 23:52:32 localhost kernel: smb_add_request: request [cd1baee0, mid=0] timed out!
Feb 25 23:52:32 localhost kernel: smb_delete_inode: could not close inode 2
Feb 25 23:52:32 localhost mount.smbfs[30898]: [2006/02/25 23:52:32, 0] client/smbmount.c:send_fs_socket(410)
Feb 25 23:52:32 localhost mount.smbfs[30898]:  mount.smbfs: entering daemon mode for service \\localhost\randyd_shared, pid=30898


Micro420 02-26-2006 11:14 PM

Silly question, but where on my Linux system (SuSE 10.0) are my log files?

randyding 02-26-2006 11:21 PM

Usually /var/log/syslog, or /var/log/messages (on my Redhat).
The logs get rotated in a cron at night and there may be messages.1 messages.2 etc..

Micro420 03-01-2006 01:17 AM

WOW! I went into my /var/log directory and started going through my logs. I found SOOO many people trying to hack into my Linux box, specifically SSH and HTTP. This is ridiculous!!!!! I will post in the Security forums to see if anybody can help me. I may have to revert to Windows Server 2003. :cry:


All times are GMT -5. The time now is 08:44 AM.