LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Configure Ethernet connection between 2 fedora 12 pcs (https://www.linuxquestions.org/questions/linux-networking-3/configure-ethernet-connection-between-2-fedora-12-pcs-793441/)

soumya_r 03-05-2010 11:57 AM

Configure Ethernet connection between 2 fedora 12 pcs
 
Hi friends, I want to connect my pc to my laptop. I have fedora 12 installed in both system.How can I do this??

custangro 03-05-2010 11:58 AM

Quote:

Originally Posted by soumya_r (Post 3887192)
Hi friends, I want to connect my pc to my laptop. I have fedora 12 installed in both system.How can I do this??

What do you mean by "connect my pc to my laptop."? You mean share files?

-C

soumya_r 03-05-2010 12:05 PM

yes, i need to share files,internet connection, just like in windows

custangro 03-05-2010 12:08 PM

Quote:

Originally Posted by soumya_r (Post 3887203)
yes, i need to share files,internet connection, just like in windows

Quick question

Are you planing on putting any Windows machines on this network in the future?

-C

soumya_r 03-05-2010 12:10 PM

yes, i also want to connect to windows 7(in laptop also having fedora 12)from my fedora 12 pc

custangro 03-05-2010 12:23 PM

Quote:

Originally Posted by soumya_r (Post 3887212)
yes, i also want to connect to windows 7(in laptop also having fedora 12)from my fedora 12 pc

Then you need to use samba

You can have 1 samba server or 2 samba servers...depending on what you want to share from what Fedora box...

a Samba server can also act like a client so I recommend installing samba on bother Fedora boxes...although ideally you only want one fileserver but for a home network it isn't a big deal...

I'd start here:

http://www.linuxhomenetworking.com/w...nux,_and_Samba

If you have any specific questions please feel free to post

-C

soumya_r 03-05-2010 12:45 PM

I have samba already installed. Would you let me know the steps to follow? I already shared a file in samba in one fedora system but i can't see it in other system.

custangro 03-05-2010 01:20 PM

Quote:

Originally Posted by soumya_r (Post 3887248)
I have samba already installed. Would you let me know the steps to follow? I already shared a file in samba in one fedora system but i can't see it in other system.

What's the output of...

Code:

grep -v '^#' /etc/samba/smb.conf

soumya_r 03-05-2010 01:22 PM

Here is the output:



[global]

workgroup = MYGROUP
server string = Samba Server Version %v

; netbios name = MYSERVER

; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.


# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50


security = user
; passdb backend = tdbsam




; realm = MY_REALM

; password server = <NT-Server-Name>


; domain master = yes
; domain logons = yes

# the login script name depends on the machine name
; logon script = %m.bat
# the login script name depends on the unix user used
; logon script = %u.bat
; logon path = \\%L\Profiles\%u
# disables profiles support by specifing an empty path
; logon path =

; add user script = /usr/sbin/useradd "%u" -n -g users
; add group script = /usr/sbin/groupadd "%g"
; add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
; delete user script = /usr/sbin/userdel "%u"
; delete user from group script = /usr/sbin/userdel "%u" "%g"
; delete group script = /usr/sbin/groupdel "%g"


; local master = no
; os level = 33
; preferred master = yes


; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes

; dns proxy = yes


; load printers = yes
cups options = raw

; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups


; map archive = no
; map hidden = no
; map read only = no
; map system = no
; store dos attributes = yes



[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
; guest ok = no
; writable = No
printable = yes

; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no


; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes


; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff

[shared to all]
comment = sam's folder
path = /home/sam/Desktop/shared to all
read only = no
; browseable = yes
guest ok = yes

custangro 03-05-2010 01:34 PM

Quote:

Originally Posted by soumya_r (Post 3887285)
Here is the output:



[global]

workgroup = MYGROUP
server string = Samba Server Version %v

; netbios name = MYSERVER

; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.


# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50


security = user
; passdb backend = tdbsam




; realm = MY_REALM

; password server = <NT-Server-Name>


; domain master = yes
; domain logons = yes

# the login script name depends on the machine name
; logon script = %m.bat
# the login script name depends on the unix user used
; logon script = %u.bat
; logon path = \\%L\Profiles\%u
# disables profiles support by specifing an empty path
; logon path =

; add user script = /usr/sbin/useradd "%u" -n -g users
; add group script = /usr/sbin/groupadd "%g"
; add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
; delete user script = /usr/sbin/userdel "%u"
; delete user from group script = /usr/sbin/userdel "%u" "%g"
; delete group script = /usr/sbin/groupdel "%g"


; local master = no
; os level = 33
; preferred master = yes


; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes

; dns proxy = yes


; load printers = yes
cups options = raw

; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups


; map archive = no
; map hidden = no
; map read only = no
; map system = no
; store dos attributes = yes



[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
; guest ok = no
; writable = No
printable = yes

; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no


; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes


; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff

[shared to all]
comment = sam's folder
path = /home/sam/Desktop/shared to all
read only = no
; browseable = yes
guest ok = yes


On the client side what does this show you...

Code:

smbclient -U <samba user name> -L <ip of samba server>
-C

soumya_r 03-05-2010 01:40 PM

It is showing connection failed. (Error NT_STATUS_HOST_UNREACHABLE)

custangro 03-05-2010 02:45 PM

Quote:

Originally Posted by soumya_r (Post 3887303)
It is showing connection failed. (Error NT_STATUS_HOST_UNREACHABLE)

Is there network connectivity? Can you ping the host? Is there a firewall issue?

Try...

Code:

/etc/init.d/iptables stop
on BOTH server and client...

Then try the command again...if it works...that means you either got to keep the firewall off...or open the SMB port on bother server/client

-C

soumya_r 03-05-2010 11:05 PM

I tried the sent code and turned off the firewall. still i cant connect to samba server. sorry, I am a newbie to network system i dont know what is SMB port.

custangro 03-05-2010 11:39 PM

Quote:

Originally Posted by soumya_r (Post 3887848)
I tried the sent code and turned off the firewall. still i cant connect to samba server. sorry, I am a newbie to network system i dont know what is SMB port.

Error Logs?

What does /var/log/samba/log.smbd or /var/log/messages tell you when you look at it? Is SELinux enabled?

Code:

root@fedora# getenforce
-C

soumya_r 03-07-2010 04:26 AM

after the getenforce command it shows enforcing.


All times are GMT -5. The time now is 12:14 AM.