LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Home Forums HCL Reviews 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 01-20-2007, 03:30 AM   #16
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976

i assume you would need to reference a smb credentials file to define the low level acount details to connect with.
 
Old 01-20-2007, 09:58 AM   #17
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Sorry, but being a linux noob coming from windows, I have no idea how to do that. I barely have an idea of what you mean about smb credentials at the moment.

Please explain in a bit more details.
 
Old 01-20-2007, 10:05 AM   #18
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
well you can just do a "username=" and "password=" in line with the existing mask options you have, but a credentials file is used to hide those details from other users, as all users can read most files in /etc if they wish. if you add an option like "credentials=/home/youruser/samba_creds" and crate that file with "username=x" and "password=y" on seperate lines, and then change the rights to mode 600 (so only you can read and write to it) then you keep securirty. if your not fussed about that, then just hardcode the username and password directly in your autofs files.
 
Old 01-21-2007, 01:13 PM   #19
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Does auto.master AKA - autofs starts its operation for SUDO user only or for all other users too?

I mean why does it need "username=" and "password=" ? Aren't these to access the actual shared drive? Because the problem is that autofs does not mount the shared drives for other users automatically, unless I first log into my sudo account and run autofs there, then log out and log back in into another user and then the folders will work.

Other users can browse via samba no problem, but autofs - it seems as if it does not start automatically for them.

I will try what you have writeen above and will psot back.
 
Old 01-21-2007, 02:10 PM   #20
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
autofs doesn't know, or care, about sudoers and such, it's totally outside of anythign like that. if autofs is configured to permit access according to its own config files, then that's kinda it. maybe i've misinterpreted your problem here, as the username and password are the credentials that are passed to the remote server, not used locally at all.
 
Old 01-21-2007, 03:38 PM   #21
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Apparently the problem even exists at my sudo account.

From my last working samba access I have created desktop shortcuts to the folders that were mounted last time autofs mounted them.

Now, I just logged in, my network is working but when accessing the folders, I get this:

"Could not enter folder /media.battlestation/G"

Only when I do this in the terminal:

"sudo /etc/init.d/autofs restart" I get access to the folders.


So the question is, does autofs automatically configured itself to run when the laptop boots?

Because according to this document:

http://gentoo-wiki.com/HOWTO_Auto_mo...nd_System_Boot

They have:

Startup and System Boot

After this is complete, start the AUTOFS daemon by issuing:

/etc/init.d/autofs start

If you wish to have this behavior on default startup, issue:

rc-update add autofs default



But

"rc-update add autofs default" is not for Kubuntu

Last edited by robertpolson; 01-21-2007 at 05:22 PM.
 
Old 01-26-2007, 06:38 PM   #22
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
[QUOTE=robertpolson;2068304]Ok, the problem has been solved.

1) Go and download Autofs synaptic or Adept for Kubuntu.

2) sudo gedit /etc/auto.master

or

kdesu kate /etc/auto.master

and

this is what I have there:


Quote:
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
/media/battlestation /etc/auto.battle --timeout=60 --ghost
/media.... is all you need to care about as the rest is commented out.

Make sure to put something close to -60 as I tried -4 seconds and that created a problem that via wireless connection I could not access the folders. The -ghost makes a it so that the location of the folders is remembered, meaning you can access the files without autofs mounting the folders.

2)auto.battle is where you specify what you want to mount. (note that auto.battle is the an empty text file I have created myself)

Here is what is in mine:

Quote:
G -fstype=cifs,noperm,iocharset=utf8,guest,file_mode= 0777,dir_mode=0777 ://192.168.1.7/G
F -fstype=cifs,noperm,iocharset=utf8,guest,file_mode=0777,dir_mod e=0777 ://192.168.1.7/F
G -fstype=cifs,noperm,iocharset=utf8,guest,file_mode=0777,dir_mod e=0777 ://192.168.1.7/G
Note that the above uses cifs file system and 0777 gives full read and write access. Reason I use cifs instead of smbfs is because Amarok works with cifs better and with smbfs I would get collection scan errors. See official Amarok samba wiki.

You can also use smbfs, it would look like this:

Quote:
G -fstype=smbfs,noperm,iocharset=utf8,guest,fmode=777,dmode=777 ://192.168.1.7/G

Where noperm, will make it so that Linux will not need to change permission on files on windows box as it does nto exist there.

That is it, just also go to terminal and do this


Quote:
sudo /etc/init.d/autofs restart

Hope this helps to someone in the future.

Last edited by robertpolson; 01-29-2007 at 05:58 PM.
 
  


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
How can I mount a Windows XP shared folder? mlse Linux - Networking 3 09-28-2006 07:36 AM
how to mount windows shared folder as normal user lucasm Linux - Software 4 09-28-2006 07:14 AM
I can not open the user folder in home and write in a shared folder jorge_ivan Linux - General 8 08-02-2006 12:28 PM
how can i move this folder of music from /root/Shared to /home/coffee/Shared ? thx mr_coffee Linux - Newbie 9 01-23-2006 07:50 AM
smbfs, fstab, spaces in the folder i want to mount. Problems! JapanFred Linux - Networking 1 12-29-2005 04:27 PM

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

All times are GMT -5. The time now is 06:50 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration