LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-15-2005, 04:58 PM   #1
onthos
Member
 
Registered: Aug 2004
Posts: 45

Rep: Reputation: Disabled
can't access my windows pc from linux box: need password


I'm trying to access a folder on my Windows XP Pro PC from my FC2 PC, but konquerer says I need a password. I never specified a password when I shared this folder, but it asks for one anyway. I've tried using 'guest' and 'anonymous', but neither work.
 
Old 03-15-2005, 05:32 PM   #2
BizHat.com
Member
 
Registered: Jul 2004
Location: India
Distribution: RH, RHEL, CentOS
Posts: 46

Rep: Reputation: 15
You have to give password of your Windows XP machine, then you will be able to access the windows share in Linux.
 
Old 03-15-2005, 05:32 PM   #3
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
try using username and password of whatever user is logged on to windows.
 
Old 03-16-2005, 07:05 AM   #4
onthos
Member
 
Registered: Aug 2004
Posts: 45

Original Poster
Rep: Reputation: Disabled
Entering in one of my Windows user names and password (even tried Administrator) didn't work.
 
Old 03-16-2005, 09:58 AM   #5
LinuxEL
Member
 
Registered: Mar 2005
Location: Canada
Distribution: Fedora Core 4
Posts: 30

Rep: Reputation: 15
At the moment your windows machines are configured to authenticate as Guests, so if your Guest account is disabled or doesn't have a password then you can not connect to them. There are two things you can do ]

1. You can Enable the Guest account and supply it with a password. Then when you try to loggin in from the network you would use the Guest account information.

or

2. Open up the mmc "Microsoft Managment Console" start..run...mmc. Once Concole is open go to File...Add/Remove Snap-in....click Add button....add in the Local Computer Policy snap-in. Once that is done look under Computer Information, Windows Settings, Security Settings, Local Policies, Security Options. Now scroll near the buttom and select: Network access: Sharing and security model for local accounts. Double click on it and change option from: Guest only - local users authenticate as Guest to Classic - local users authenticate as themselves. Now you can loggin as any user on the machine.


I would do the second one because you can then loggin as administrator and access hidden shares.
 
Old 03-18-2005, 08:46 PM   #6
onthos
Member
 
Registered: Aug 2004
Posts: 45

Original Poster
Rep: Reputation: Disabled
I tried both those options (setting up a guest account and changing that network policy) and I still can't access my windows folders. I can get to the share of 'drive_c,' but when I try to open any other folder (such as Program Files) I get asked for a username and password.

Plus, I have another problem, which is the opposite of my first problem. I can't access my linux box's shared folder from my WinXP PC.
 
Old 03-19-2005, 10:10 AM   #7
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
Quote:
Originally posted by onthos
I tried both those options (setting up a guest account and changing that network policy) and I still can't access my windows folders. I can get to the share of 'drive_c,' but when I try to open any other folder (such as Program Files) I get asked for a username and password.

Plus, I have another problem, which is the opposite of my first problem. I can't access my linux box's shared folder from my WinXP PC.
maybe you could tell us exactly *how* you are trying to access your folders so we can figure out what you're doing wrong. as one of the mods here says, we're not mindreaders.

to access your linux shares, you need samba to be set up and configured properly (and running, of course). post your smb.conf and relevant details.
 
Old 03-19-2005, 10:34 AM   #8
onthos
Member
 
Registered: Aug 2004
Posts: 45

Original Poster
Rep: Reputation: Disabled
The way I am trying to access my networked computers from linux is through Konquerer using smb:/ in the address bar. That takes me to my local network. I advance to 'roomtwo' which is my workgroup, then to 'pc1' which is my windows pc. I can see four shares now: C$ | drive_c | print$ | SharedDocs . I can open up drive_c's contents, but when I try to go anywhere from there (Program Files is where I intend to go), it asks me for a username and password. Now, I've tried using my account/pw, administrator/pw, guest/pw, guest w/ no pw. Nothing works. The guest account is turned on right now, just in case you are wondering, and I changed a network policy as suggested by LinuxEL.

I'm pretty sure samba is up and running currently, but just in case, how do I check?

My smb.conf file is pretty long, would you like me to post it anyway?

I was instructed to run testparm, and this is the output:

[root@linpc onthos]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[shared]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

# Global parameters
[global]
workgroup = ROOMTWO
server string = Samba Server
security = SHARE
password server = None
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
dns proxy = No
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
guest ok = Yes

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

[shared]
comment = linbox shared files
path = /home/onthos/shared
read only = No
 
Old 03-19-2005, 11:32 AM   #9
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
if you are accessing the root drive (C$) as an administrator, i would think you would then have access to everything beneath it. i'm a little unclear on your setup, though: is "drive_c" a folder name of a share, or what is that? normally i would think ProgramFiles would be on your actual C drive (C$). if it's a folder, double check to see that you have permissions set up right for it in windows (right click folder, go to "sharing," set permissions).

i always get "smb is not a registered protocol" when i try to use a browser, so i use xfsamba4 (only in xfce4, i think, but there's also the old gtk xfsamba), or else usually i just mount the share directly. there might be other dedicated programs too, so it might be worthwhile to test one of them (or another browser) on the slim chance that it is something to do with konqueror (probably not, but i'm just trying to cover all the bases here ).

you might also want to try mounting directly to see if that at least works. that could help pinpoint the problem. so for ex: you could create a directory in /mnt, calling it shares. then as root do:

mount -t smbfs //pc1/SharedDocs /mnt/shares -o username=<name>

or, if you wanted to mount the root partition (check in windows to make sure it's shared):

mount -t smbfs //pc1/C$ /mnt/shares -o username=<name>

using for <name> whatever is your account name in windows. then it should ask for a password, enter the account password, and see what happens. it should mount, and then you can cd into it and look around. at least then if it doesn't, you might get some error messages to help figure out the problem.

in your smb.conf, you might want to try changing "security = share" to "security = user" in the global section, and then adding a "valid users = <name>" to the [shared] section (where <name> is your windows account name). then restart samba. (i usually just do "killall smbd nmbd", then "/usr/sbin/smbd -D" and "/usr/sbin/nmbd -D" to restart, all as root, which should work regardless of distro).

everything else looks basically okay, except i don't know about those idmap uid/gids, they look like some permissions thing, but that string of numbers looks kind of weird to me (too lazy to read the man pages right now, sorry ). i would comment them out until it's working, then uncomment them back again if you think you need to. also add an "encrypt passwords = yes" and take out the "guest ok" line, both in the global section. i think it's probably just more secure that way, i.e., using user-level security rather than potentially opening the share to anyone. then do the stop/restart i mentioned above. gl, post back on your progress.

Last edited by synaptical; 03-19-2005 at 11:34 AM.
 
Old 03-19-2005, 12:05 PM   #10
onthos
Member
 
Registered: Aug 2004
Posts: 45

Original Poster
Rep: Reputation: Disabled
I tried using the mount command and it worked. It really worked.

Also, I found out that smbd and nmbd weren't running, so I had to start the processes and the network works well.

Now I have another question (hopefully my last on this subject.) How do I make it so that smbd and nmbd load at startup?

EDIT: to answer your question, I made a second share of my C: drive on the windows machine.. because I didn't know what C$ meant.

Last edited by onthos; 03-19-2005 at 12:07 PM.
 
Old 03-19-2005, 12:19 PM   #11
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
it's working! hooray!

i'm not sure how fedora starts samba at boot. i think it follows the rc.d structure? check in /etc/rc.d for a samba script, which then should be started by one of your rc scripts (rc.M i think) and is probably just commented out. otherwise, sorry to say it, but RTM for fedora initializations, search LQ, or maybe someone who uses fedora can chime in.


Last edited by synaptical; 03-19-2005 at 12:24 PM.
 
Old 03-19-2005, 09:39 PM   #12
sandgroper
Member
 
Registered: Jul 2004
Location: Perth , Western Australia
Distribution: Fedora Core 5 , Mint 9
Posts: 118

Rep: Reputation: 15
Quote:
Originally posted by synaptical
it's working! hooray!

i'm not sure how fedora starts samba at boot. i think it follows the rc.d structure? check in /etc/rc.d for a samba script, which then should be started by one of your rc scripts (rc.M i think) and is probably just commented out. otherwise, sorry to say it, but RTM for fedora initializations, search LQ, or maybe someone who uses fedora can chime in.
There are 2 ways of configuring samba to start on boot-up , in text mode or a terminal type ntsysv and the Services utility will show up and then scroll down the list and then use the spacebar to select/deslect the option for smb.

The other way is through Gnome and the menu , System Settings --> Server Settings --> Services , scroll down the list and select smb , you can select smb to run for levels 3 & 5

Another way of checking to see if smb is running is to use at a terminal the command
chkconfig --list |grep smb

Another useful command to use to
smbclient -L localhost
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Linux box using windows very slow niloshima Linux - Networking 1 12-01-2005 01:46 AM
Can't access my Linux box from my Windows machines. kingkongadp64 SUSE / openSUSE 4 10-29-2005 04:13 PM
Unable to access NTFS on linux box from windows... MrLizard Linux - Networking 3 09-11-2005 03:56 AM
Samba: Windows can't access linux. Password needed?!? mcgoon Linux - Networking 26 06-10-2005 06:53 PM
Samba: Windows XP Pro access to Linux box bramadams Slackware 7 02-05-2005 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration