LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-05-2004, 09:25 PM   #1
FLOODS
Member
 
Registered: Aug 2003
Location: GA
Distribution: Fedora Core 4 Desktop/Server.
Posts: 361

Rep: Reputation: 30
samba repetitively asks for username/password in nautilus


Been setting up samba on my network and am now done, but I have two questions left that I just can't find.

When I go to smb:/// in nautilus, it asks for a username and password. I fill it out and I get to the workgroup stage, I open my workgroup and it asks again, so I fill it out. I then go to the server and it asks.. again. I have a ~20 character password, and just found out that if I hit escape I get the same results (so it seems, anyways). When using konqueror, it doesn't ask for the username and password a million times. Is there any way to fix all of that?

Second, is how to mount samba shares on startup, or if I can mount them as a user.
I edited my fstab and filled it all out correctly, then put auto and user in the options category. I then restarted and it asked for a password so I filled that out, and then it was unable to connect to the share (it did this before samba started, too, odd?), so I just thought to myself "I'll take the auto option out, no big deal." I then took the auto option from my fstab and tried
Code:
mount -t smbfs -o username=USERNAME,password=PASSWORD //SERVER/FOLDER /mnt/FOLDER
and it said I must be root to do this.

I read up online and added an account entitled "nobody" thinking that may do the trick, and excluded a password. No luck with either.

If I'm unable to do any of that above, is there atleast an easier way than typing out mount -t smbfs -o username=USERNAME,password=PASSWORD //SERVER/FOLDER /mnt/FOLDER?

EDIT: Using slackware 9.1 and samba 3.0.3

Last edited by FLOODS; 05-05-2004 at 09:26 PM.
 
Old 05-06-2004, 04:49 AM   #2
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
OK, I just tried this (I don't use the Nautilus Samba browser normally), and while I can get to my workgroup without needing to enter a password (most likely because I have Samba configured to set my PC as part of the workgroup already), I find that I can't browse the other computers, even though, according to the property sheet for the networked computer, "others" (meaning me, since I am not the owner, who is root, nor a member of the owning group, which is the root group) should have read privileges. I was not asked for my username or password, but I don't know why. There could be at least two reasons that I can think of, and I don't have any interest in investigating, because....

...fortunately, I use a completely different method to mount networked drives at startup (which is why I don't use the Nautilus SMB browser under normal circumstances).

The program that I use is called LinNeighborhood. There's an old (Slack 8.1) binary linked on the site, but I'm sure it's available in the 9.1 package repository, or on LinuxPackages.net.

As long as you have Samba properly configured (that /etc/samba/smb.conf has the correct workgroup set is the main thing you want to check), that you are an authorize Samba user (your Linux uname and password have been added and enabled by running smbpasswd as root), and Windows file sharing is properly configured (under Win2K and XP, the user connecting to the shares must be a user known to the Windows box, so an authorized Windows user must be created by the Administrator of the Windows box; however, this does not necessarily have to replicate your Linux login and password, as long as the Windows user is not logged in at the time), the program is relatively easy to set up, and any difficulties are more than made up for by the automagical mounting, and the flexible mountability, since you only have to do this setup once.

Here's how it's done:

Install LinNeighborhood (naturally) and run it. Go to Edit=>Preferences. Set your Workgroup in the appropriate field, and check the "always scan as user", "groups scan as user" and "ask user/password once" (at least that's my settings, and they work for me).

Then go to the "Miscellaneous" tab and enter an authorized Windows username and password into the Default User fields (and you can also choose "Save default password"). Depending on your setup, this might be guest, or it might be your own Windows login (if you're connecting to a third box, for example), or you can create a dummy user under Windows solely for this purpose (to protect the computer from hacks to some degree; the dummy user doesn't have any rights or privileges other than to read/write to these shares). You can also configure the mount point of the mounted shares in this tab.

Don't forget to enable the most important setting in this tab (and in fact, the whole program)-- Memorize mounted shares and remount on startup.

Save your settings, close LinNeighborhood and reopen it (so the settings are re-read and used). You should see your workgroup listed. Double-click it and you should get a dialog with the username and password you filled in earlier. If it's good, just click OK, and the shares should be listed. Select each one that you want to mount, right-click and choose "mount" (the only entry in the right-click menu). If you didn't select the "don't show mount dialog, just use defaults" option in the Miscellaneous tab, then a dialog will come up telling you how LinNeighborhood intends to mount the share, and you can change various options. If you did select that option, the share will be mounted according to the defaults you set previously. Once the share is mounted, it will appear in the lower half of the main window, where you can right-click it to unmount it, or open the share in a file manager (midnight commander by default, but this can be configured in the PostMount tab of the Preferences. I never use this, however, as it's not necessary-- as you will see).

When you have mounted all your shares, exit LinNeighborhood (this will not unmount the shares). There's only one step left.

The thing about LinNeighborhood's "Remount on startup" setting is that it refers to LinNeighborhood startup and not system startup as one might think. So this means that LinNeighborhood must be started when you login to remount the shares. However, it does not need to be started with the GUI-- running LinNeighborhood using the -m switch starts LinNeighborhood without a GUI, mounts the shares and exits, so the shares get mounted and you never see a thing.

Under GNOME, you add LinNeighborhood -m to the "Sessons" menu, as follows:

Foot Menu=>Desktop Preferences=>Advanced=>Sessions=>Startup Programs tab. Click the "Add" button and type LinNeighborhood -m in the "Startup Command" box.

Under KDE, you'd want to go to ~/.kde/Autostart (that means the hidden kde folder in your $HOME directory; if you can't see hidden dotfiles, then turn on Show Hidden Files in your file manager) in a file manager, right-click and create a launcher to LinNeighborhood -m.

If you use another WM, I can't tell you how to add programs to run when the WM is started, but you could look that up yourself in the documentation for that Window Manager.

In any case, the shares will be mounted normally in your home directory, so there's no need to use the SMB browser at all.

Hope this helps, I'm sure there's a way to do all this with mount and smbfs and all, but I've never had to use those commands, so I don't know a thing about their finer points. Guess I should read that section of man mount and maybe man smbclient one of these days .

Last edited by motub; 05-06-2004 at 04:50 AM.
 
Old 05-06-2004, 10:27 AM   #3
FLOODS
Member
 
Registered: Aug 2003
Location: GA
Distribution: Fedora Core 4 Desktop/Server.
Posts: 361

Original Poster
Rep: Reputation: 30
linneighborhood isn't on the slack distro, but I do remember reading that it should be on the next version of slack.

I'm at school and will go home and get linneighborhood, I've heard a lot about it and haven't even thought about it until you mentioned it now!

smb.conf is configured properly so that should all be ok, so I'll just have to do all the configuration to samba, and make it start when I startx in blackbox, since I go between it and gnome.

I'll reply back when I get home.
Thanks for the reply!
 
Old 05-06-2004, 04:03 PM   #4
FLOODS
Member
 
Registered: Aug 2003
Location: GA
Distribution: Fedora Core 4 Desktop/Server.
Posts: 361

Original Poster
Rep: Reputation: 30
got gettext installed, along with linneighborhood. I like it! It doesn't ask for my username and password every time I care to do ANYTHING.. lol
It does ask for it every time I restart it and want to browse my workgroup, but that's no problem. It saves the password so all I have to do is press enter anyways..

I'm using slack-get right now and updating my system, so I will reboot after this is done and re-login to x and see how it goes.

Thanks for the help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
username and password prompt: samba configuration caesarkim Linux - Networking 4 05-21-2009 09:13 AM
Samba access without unix username/password? mdkelly069 Linux - Networking 0 09-13-2004 05:05 PM
Samba username and password downinthemine Linux - Networking 2 01-10-2004 08:01 AM
Samba asks password element Linux - Networking 1 09-11-2003 04:35 PM
Username and Password accessing samba? Sir.Del Linux - Networking 14 12-24-2001 03:05 AM


All times are GMT -5. The time now is 10:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration