Networking to my wife's Windows's PC?

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

Networking to my wife's Windows's PC?

Postby ashley194 » Sun Jul 29, 2007 16:37

I'm running SL 3.4a x86-64 & thought I'd give accessing my wife's PC a go. Normally, I'd simply boot into XP (I'm dual-booting with XP & SL) & transfer files around. Only this time, after installing 3.4a my XP no longer boots simply says ' XP BOOTING' but nothing happens :cry:
So I find myself stuck in SL & thought I'd try to get SAMBA working. Has anyone got any advice/instructions or a how-to...?

Thanks :D
User avatar
ashley194
Technological Hen
 
Posts: 321
Joined: Mon Feb 19, 2007 21:54
Location: Manchester, UK.

Postby WarraWarra » Sun Jul 29, 2007 19:45

For the dual boot just use the live dvd and install + fix boot under the upgrade part of the installer.
This should work, takes about 4 mins max.

Samba not sure but might need NFS or similar not sure but you can check the wiki above this page or try gentoo.org forums / wiki for answers.
User avatar
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Postby davemc » Wed Aug 01, 2007 20:34

Ashley wants to get Samba working. Samba=the devil!

1) Give sshfs a shot. Its secure and blazing fast. You can also do regular ssh and ssh -X via Putty in Windows/Linux. Very simple ssh is

$ssh loginusername@server

-loginusername is the name you use to login to the ssh server account. Can be whatever account you already have on that server system.

-server is the server. You can use the IP of it or the dot com if you have one.

To take it further, you can even long in to specific filesets.

$ssh loginusername@server:/home/loginusername/whatever

Sshfs is a fusemount over ssh. Simple as that. To get that done you need both ssh client and fuse setup on your machine, and ssh server and fuse setup on the server...

$sshfs loginusername@server:/home/loginusername/whatever /mnt/mountpount

-loginusername@server:/home/loginusername/whatever = as above with ssh
-/mnt/mountpoint = the mountpoint you have setup on your machine. This can be a file you create (mkdir /home/mountpoint, or /mnt/mountpoint) that you want mounted, etc.

If youve done all that right, then you will see a mountpoint appear on your desktop with instant access to the servers files over a secure ssh fuse.

Ssh and thus, sshfs is going to authenticate. This means passwords, each time you do it. You can avoid this by sharing rsa keys. This is easy to do if you follow that sshfs wiki.

-cd $HOME
-make your rsa.pub key.
-sftp into your server as above with ssh TO the ~/.ssh file.
-put rsa.pub, etc.
-quit
-ssh into server and cd to ~/.ssh
-cat rsa.pub >> authorized_keys
-logout

Done!

Test this by ssh back into the server again. It should not ask for a password and just log you right on in.

Now you need to setup your /etc/fstab to automount. Again, could not be easier! Follow that wiki, as my mini "how to" is not entirely complete as im going off memory here.

After setting up your mountpoint in fstab, test by running mount /mnt/mountpoint and your mount should appear on your desktop after it logs into the server.

Phew.. Ok now on to evil Samba.

Sabayons smb.conf file is an absolute catastrophe IMO. I did the fun thing and deleted it. I then copied and pasted the smb.conf from my Ubuntu server (which is the proper way to setup smb.conf) and all works like it should! In theory you only need 3 or 4 lines in that file to get things working correctly. Many, many samba guides out there including the samba projects site. Many people say you have to have your accounts and smbpasswd setup correctly on all your machines, so that all machines have a common account username and password. This is not entirely correct, as I have zero extra accounts setup on my home lan of 7 machines, and samba works flawlessly on my 5 line smb.conf setup. The problem lies with how default smb.conf sets up authentication, etc. for security purposes. Its not wrong, but its a mess. Anyway, Samba (CIFS) is not the optimal way to network for either windows or Linux. Many alternative methods out there (NFS, sshfs, fuse, ssh -X, vnc, putty).

That indeed is the fun of Linux though. You learn and learn and learn and its fun!
User avatar
davemc
Sharecropper
 
Posts: 680
Joined: Tue Jan 02, 2007 17:08
Location: Virginia, usa

Postby davemc » Thu Aug 02, 2007 1:48

This is what you need in your etc/samba/smb.conf. to play nicely with others..

*at a minimum you need the global*

[global]
workgroup = nameofworkgroup
netbios name = nameofcomputer
security = share
hosts allow = 192.168.15. (this is an example IP range. You do not need a complete IP set here)

(Example of a share)

[SABAYONSHARE]
path = /path/to/share/file
read only = no
guest ok = yes


You can setup shares by right click menu on a folder (share), or modify smb.conf manually like above for an existing folder you want to share. So long as your global section is set as above. Delete everything else in the file thats not part of these linesets EXCEPT for the [printer ] sections. You are now good to go!
User avatar
davemc
Sharecropper
 
Posts: 680
Joined: Tue Jan 02, 2007 17:08
Location: Virginia, usa


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest