Ubuntu :: Using Autofs With Cifs Shares?

May 27, 2010

I am attempting to set up autofs on Ubuntu 10.04 so that it can automatically mount cifs shares when wifi is connected. For some reason, it isn't working. First of all, I know the share is accessible because doing this works fine:

Code:
sudo mount.cifs //192.168.0.12/share /cifs -o credentials=/etc/samba/credentials
This is in my /etc/auto.master
Code:
/cifs /etc/auto.home --timeout=60 --ghost
And this is /etc/auto.home

[Code]...

View 3 Replies


ADVERTISEMENT

CentOS 5 :: Can't Get Autofs Working (CIFS)?

Oct 1, 2009

Greetings. I cannot get autofs to mount a CIFS share. I tried to follow http://wiki.centos.org/TipsAndTricks/WindowsShares .

a) Windows share is \server-01Share

b) user: backups, password: backups has READ access to this share

c) mount -t cifs //server-01/Share -o username=backups,password=backups /mnt/server-01 WORKS FINE

d) Note that most default Centos services (including all NFS stuff has been disabled on boot, if this makes any difference)

e) /etc/auto.master:

left default configuration including (should these be changed or rem'd out?:)

/misc /etc/auto.misc
/net -hosts
#added at end of file
/test/auto.test
f) created /test and /etc/auto.test
#auto.test
#note I tried rw and just r

test -fstype=cifs,rw,noperm,user=backups,pass=backups ://server-01/Share

g) ls /test = nothing
e) message log contains automount:..."lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master"

View 15 Replies View Related

Fedora :: Mounting SMB/CIFS Volumes With Autofs On The Fly?

Feb 18, 2010

There are a couple of way to mount Samba shares, but I prefer using "autofs" which can mount them on the fly. Use the autofs daemon to have shares automatically mounted on demand. The netfs service (installed by default in Fedora) is not a daemon and can only mount shares on boot, (it can't mount them on demand).

* Install the autofs package:

Code:
yum install autofs * Edit /etc/auto.master (the master map file), and comment out all lines (with #). This avoids conflicts with the CDROM (which is handled by Gnome), etc. Save the file. * Create a new file /etc/auto.cifs, with the contents of:
Code:
#!/bin/bash
# $Id$

[Code]...

View 4 Replies View Related

Server :: Use Autofs To Mount CIFS Share And Busy Files?

Apr 29, 2010

We have a homegrown process that runs on a windows box and produces a csv file. We mount the directory these are output to using autofs/cifs and then process them using a program on our linux database servers.

Is there a way from linux, looking at the cifs share, to tell if the target file is currently in use by a process on the windows box? We are having issues where an incomplete file is being processed occasionally.

View 5 Replies View Related

Ubuntu Security :: Using AutoFS To Mount CIFS Share Without Leaving Unencrypted Passwords

Jul 30, 2011

I followed this howto in order to mount CIFS shares on demand. This works great, however, this guide suggests leaving my network passwords unencrypted on the disk. This is a very bad security practice, as the passwords can be easly retrieved by booting the computer using a different OS.

I was looking for a way to secure things up, so I came up with this solution: Instead of storing the passwords plain text on the disk, I store them in a tar file encrypted using GPG. When I boot my system, I open this file to a directory in /dev/shm, and order AutoFS to retrieve the passwords from there.

This does the trick, but I presume this solution is not that secure, since /dev/shm content can be written to the swap partition. Is there any other solution which is a better security practice? Maybe using some sort of keyring service?

View 3 Replies View Related

Ubuntu Networking :: Automatically Mount NFS Shares Without Autofs?

Jan 24, 2010

Setup clients on a LAN to automatically mount NFS shares whenever the fileserver is up, without using autofs. Instead a simple bash script which checks if the server is up, and if the shares need to be mounted or unmounted is called by a custom upstart job. For a small office or home network populated with Unix-like computers (e.g., a few Ubuntu desktops or laptops and a fileserver), NFS (Network File System) is a good way to share storage space and centralise the backup of important documents. However, having a fileserver running 24/7 is often overkill for such a setup.

One way to have clients mount NFS shares automatically when the fileserver is turned on, is to use a package called autofs. Unfortunately, there are a few unresolved issues with using autofs in combination with NFS. In my case, when autofs tries to mount NFS shares when the fileserver is turned off, the Gnome desktop, and Nautilus in particular, becomes extremely unresponsive, regardless of the options used. Attempting to mount the share manually from the command line when the server is down however, does return a message of failure quite promptly, without hanging the desktop.

To solve this issue, I wrote a simple bash script that is run through the upstart system. The script simply checks if the fileserver is up, if the shares need mounting or unmounting, and then sleeps for a while before checking again. This works out quite well, so I decided to share this information in case someone else runs into these issues. PrerequisitesThis howto assumes that you have an NFS server set up with shares exported, and one or more clients capable of mounting those shares. For more information on setting up NFS shares and mounting them on a client from the command line, see: SettingUpNFSHowTo.

Clients should be able to ping the server to determine if it is running. Naturally, you need administrator access on the clients to install the script and upstart job outlined below. This script assumes that the directory paths of the shares match the location where they are mounted. In my case, the fileserver has two shares: /media/Storage and /media/Backup. On the clients these shares are mounted on the same paths. If your setup deviates from this, the script needs some modification. The script From the desktop of one the clients, paste the following bash script as a new file in your favourite text editor:

Code:

#!/bin/bash
# The hostname or IP-address of the fileserver:
FILESERVER="myfileserver.local"
# Check every X seconds (60 is a good default):

[code]...

Now adjust the FILESERVER variable. In this example, my fileserver is called myfileserver. By default, Ubuntu sets up your networking environment in such a way, that computername.local can be used to reach that computer over the local network, so the network name for myfileserver is myfileserver.local. Of course, you can also use the IP-address of the server. Next, change the MOUNTS variable to match the NFS shares exported by your NFS server. MOUNTS is an array; multiple entries are separated by spaces. So if you have one share exported as /media/MyShare, that line would look like this:

Code:

MOUNTS=( "/media/MyShare" )

An advantage of mounting shares in /media, is that they automatically show up as mounted drives on the user's desktop. Note that this howto assumes that you use the same paths for the share on the server and client side! Save the script to your desktop with an obvious name. In this example we call it mount_my_nfs_shares. Open a terminal and cd to the desktop. Make the script executable by calling:

Code:

chmod +x mount_my_nfs_shares

Next, move it to a place where it can be called by our upstart job, but also from the console to test. A good place to put such custom executables is /usr/local/bin.

Code:

sudo mv mount_my_nfs_shares /usr/local/bin

This script uses the logger command to tell the system's log what it is doing. To test this script, open up two terminals; in one, execute the following so we can monitor the log messages:

Code:

tail -f /var/log/syslog

In the other, simply execute mount_my_nfs_shares. If the script works, your shares should show up on the desktop and the computer:// location in Nautilus. If the fileserver goes down or becomes unreachable, the shares should disappear, and reappear when the fileserver comes back on-line. If this works, move on to the next step. Installing a custom upstart job The next step is to have the clients automatically run the above script when they are booted. We can use upstart for this. Create a new text file, and enter the following:

Code:

# mount_my_nfs_shares - mount NFS shares on fileserver, if present
description"Mount NFS-shares"
start on (filesystem)
respawn

[code]....

How the script works The script enters an eternal loop and keeps checking if it can reach the fileserver once every minute (unless you adjust the INTERVAL variable). If it can reach (ping) the fileserver, it checks if the mounts are already mounted by searching for them (grepping) in the output of mount. If they are not mounted, it tries to mount them. Else, if the server is down, it looks in the output of mount to see if these mounts exist. If they do, it tries to unmount them with the -f flag (useful for unmounting unreachable NFS shares).

View 9 Replies View Related

Fedora :: Where Do CIFS Network Shares Get Mounted?

Jan 21, 2011

I have mounted a windows network share using the gnome desktop environment, using Places -> Connect To server.The network share is OK, and I have the icon on my desktop and can see all the files.I want to be able to use this network as well in the console, so I need the mount point.What is the location on the filesystem were this networkdrive gets mounted? I find nothing in /mnt and nothing in /media also using mount to look at the registered mounts, there is no entry for the networkdrive.Nevertheless, I have this networkdrive now open in my desktop, and have an option to unmount it.I know that using the mount.cifs command you can specify the mounting point.

View 2 Replies View Related

OpenSUSE Network :: Automount CIFS Shares?

Jan 30, 2010

Question 1.I have strange problem in OpenSUSE 11.2I have /etc/fstab entry:

//server/projects /server/projects cifscredentials=/root/.credentials,dir_mode=0777,file_mode=0777,_netdev 0 0
service network running

[code]....

View 1 Replies View Related

Fedora Networking :: Windows CIFS Shares At Startup

Jun 3, 2011

After booting, the sda5 and sda8 mounts work fine, but the Windows shares haven't been mounted. If I enter the command: mount -a everything works fine. I don't know if this a timing issue, or something to do with the new systemd stuff, but it has happened in previous Fedora releases from time to time.

View 1 Replies View Related

Networking :: Unable To Mount Cifs Shares As User?

Oct 4, 2010

this subject seems to have been touched a hundred times, but after following all the advice google could provide, i'm still unable to mount cifs shares as user, here's the fstab line

<server> <mountpoint> cifs rw,noauto,credentials=/etc/gattonauth,uid=1000,gid=1000,dir_mode=0770 0 0
i've chowned the mountpoint to the user,
ive tried
chmod +s /sbin/mount.cifs /sbin/mount.cifs
suggested by http://www.linuxquestions.org/questi...-lenny-711337/

View 9 Replies View Related

Ubuntu :: Major CIFS Errors When Accessing Shares Etc In 10.04 - No Response For Cmd 50 Mid 34703

May 1, 2010

Since upgrading to 10.04 I have had constant CIFS errors in /var/log/syslog

Eg -
May 1 10:33:46 eclair kernel: [ 933.789217] CIFS VFS: No response for cmd 50 mid 32895
May 1 10:33:46 eclair kernel: [ 933.794567] CIFS VFS: No response for cmd 50 mid 32900
May 1 10:33:48 eclair kernel: [ 935.721371] CIFS VFS: No response to cmd 46 mid 37294

[code]....

All shares mount and I can open them etc, but always those errors appear whenever I try and browse to it, read them etc. These shares are mount from a Windows 2003 Server and no other machine has a problem reading or writing to this machine. I have changed the network cable and network cards in both machines, with no success. If I copy a file from a local drive to a CIFS drive, the file on the CIFS drive becomes corrupted.

View 4 Replies View Related

Red Hat / Fedora :: Intermittent Slow Access To Cifs Mounted Shares

Jan 14, 2010

The shares get mounted correctly and you can navigate through the directories and open files.The only problem is that it randomly starts going really slow taking 30 seconds or longer to open a directory that has 2 or 3 files in it.I have tried quite a few things to try and fix this without any luck. Its getting to the point where I am having to consider recommending that we use windows instead, which I would rather not do as I think its good for students to experience different operating systems during school.

View 9 Replies View Related

Networking :: After Upgrading From Win7-32 To WIN7-64 Can't Mount Cifs Shares

Jul 21, 2010

This is the first time I have run into issues mounting windows shares but I really can't figure this out. Can someone put me out of my windows misery please.

First off, last week I rebuilt my work PC fromWIN7 32bit to WIN7 64bit since then I can no longer mount the window share on my ubuntu server:

I recreated my windows share called "Linux" and used the properties, advanced sharing and added everyone, full access and my domain account full access.

If I browse to \ipaddress I can see my share and access it. From a XP machine I can see the share and access it.

From linux I use the same mount point as before, /linux I use the same fstab and it fails

Code:

I try this manually now:

Code:

Next I try to mount it:


Code:

I looked at my firewall rules and they seem ok.

Next test was connecting to my 2nd pc on windows XP no probs mounted first time.

What is wrong with my new Win 7 setup?

View 2 Replies View Related

Networking :: Can't View List Of Shares In Nautilus But Can Browse Shares Directly?

Dec 11, 2008

I run opensuse 11 at work. I'm trying to see the list of shares on a "server" that is running windows server 2000. If I try smb://server, it doesn't show any shares, but I can browse directly to it such as smb://server/share1. If I use smbclient, it returns the list of shares correctly. I guess I just don't understand why smbclient shows the list of shared folders, but nautilus cannot.

View 3 Replies View Related

General :: Administration - Managing SAMBA Shares And Giving User Specific Access For The Shares

Jul 28, 2010

I am working as a Linux administrator in a very small data centre with 5 servers with following routine tasks.

1. Managing SAMBA shares and giving user specific access for the shares.
2. Scheduling backup of some mount points with rsycn to store data in remote hard disk
3. User and group administration, with sudo access.
4. Creating and Managing Xen Virtual machines and giving access to other project teams.
5. Automating some tasks with Shell Scripting.
6. Managing FTP server for user uploads.

I have practiced a lot in my home laptop without RHEL training, Cleared RHCE and LPIC1. I want to do some advanced system admin tasks, but do not have option in my current data centre. With Above skills is it possible to get a job ?

View 9 Replies View Related

Ubuntu :: Can't Mount With Autofs

Jun 22, 2011

The static mount works fine, here is my fstab (of course uncommented for the test, and /mnt/temp/NAS* directories created) :

Code:
# Partages NAS1
#172.26.155.6:/volume1/movies /mnt/temp/NAS1/movies nfs rsize=8192,wsize=8192,timeo=14,intr,nolock
#172.26.155.6:/volume1/music /mnt/temp/NAS1/music nfs rsize=8192,wsize=8192,timeo=14,intr,nolock

[Code].....

View 2 Replies View Related

Ubuntu Installation :: Apt-get Errors For Autofs

Feb 2, 2011

Tried to update autofs feature. As per this link: [url]

I tried

I get error:

I get similar errors when trying to update some other packages as well. Is there a location where the packages are ?

View 2 Replies View Related

Ubuntu :: Autofs Not Working Properly?

Apr 24, 2011

I managed to configure autofs5 on my Kubuntu 10.10. I want to use autofs to mount my NAS drive, when I am home(most of the time ) and not bother me when I am away. I mount it in /etc/fstab, but suspend and hibernate does not work correctly, when I am not at home. Now I comment the line which mounts the NAS driveI am still not at home, and decided to try to autofs my flash drive Here is my auto.master

Code:
# directory map
/- /etc/auto.direct --timeout=2 --ghost

[code]....

View 4 Replies View Related

Ubuntu Networking :: Mounting NFS Share By Autofs?

Oct 28, 2010

I have a server, with a static IP of 192.168.1.17, that is running Ubuntu lucid sever edition and that exports some shares per NFS. Here is its /etc/exports:

Code:
/media/Share00 192.168.1.0/255.255.255.0(rw,nohide,insecure,no_subtree_check,async)
/media/Share01 192.168.1.0/255.255.255.0(rw,nohide,insecure,no_subtree_check,async)
/media/Share02 192.168.1.0/255.255.255.0(rw,nohide,insecure,no_subtree_check,async)
/media/Share03 192.168.1.0/255.255.255.0(rw,nohide,insecure,no_subtree_check,async)

[Code]....

However, autofs does not work: the /msrv directory appears and disappears when I start and stop autofs; but when I enter "cd /msrv" followed by "cd Share05" in the terminal, I get the "bash: cd: /msrv/Share05: No such file or directory" message after the second command.

View 9 Replies View Related

Fedora :: How To Mount Nfs Using Autofs

Oct 8, 2009

i just create a nfs server and share a /123 directory , i can successfully mount this share using mount command , but i cant be mount using auto.master (autofs) , how can i mount this share using autofs .

View 1 Replies View Related

Ubuntu :: Network Shares Not Available \ When Use OpenOffice Writer To Open/save Files The Shares Disappear In The "Open/Places"?

Apr 23, 2010

I am giving 10.04RC a try instead of Windows 7, so far so good. I can connect to my network shares fine using "Connect to a Server" & bookmark with the file browser, however when I use OpenOffice writer Spreadsheet to open/save files the shares disappear in the"Open/Places". Is this a bug in Ubuntu or Open Office? Is there an update/fix?

View 1 Replies View Related

Ubuntu :: Using Autofs To Wake Samba Server Over Ethernet

Sep 20, 2010

I'm trying to set autofs up to wake a samba file server whenever I want to use it. I found this page which apparently demonstrates how to do it with NFS. With a bit of modification I've managed to come up with this:

Code:
/etc/auto.wake
#!/bin/sh
hostsrv=<server ip address>
hostmac=<server mac address>
opts="-fstype=cifs,rw,credentials=/etc/samba/.creds"

netcat -w 5 -z $hostsrv 445
status=$?
if [ $status -ne 0 ]
then
/usr/sbin/etherwake -i $hostsrv $hostmac
sleep 60
fi

/bin/echo -n "share"
/bin/echo -n -e " "
/bin/echo -n "$opts"
/bin/echo -n -e " "
/bin/echo "://$hostsrv/share"

Now, I've added this line to auto.master

Code:
/server /etc/auto.wake --timeout=60 --ghost
and restarted autofs
Code:
sudo service autofs restart
It wakes up the server successfully but then when I wait 60 seconds and browse the /server directory on the client the share doesn't appear at all.

View 1 Replies View Related

Ubuntu :: Autofs(5): Direct Mapping NFS4 Share

Jun 25, 2011

how to make autofa5 work [with NFS4] using [in]direct mapping but no joy so far. Firsty, this the "/etc/exports" on my NFS4 server (CentOS 5.6):

Code:

/media/exPort htpc(ro,sync,no_subtree_check,no_root_squash,fsid=0)
/media/exPort/mMusic htpc(ro,sync,no_subtree_check,no_root_squash)

and this what I have in there:

Code:

[root@serv03 /]# ls -l /media/exPort/mMusic
total 16
drwxrwxr-x 11 databank lhome 4096 Jun 23 21:25 iTunes
drwxrwxr-x 3 databank lhome 4096 Aug 19 2010 Network Trash Folder
drwxrwxr-x 3 databank lhome 4096 Aug 13 2010 Streaming Radio

[code]....

But it doesn't work - neither it throws any errors in, nor does it mount the share. All I need is to mount "/mMusic" (i.e. /media/exPort/mMusic) as "serv03:/media/nMedia/mMusic" so that tree looks like this:

Code:
.
|-- media
| |-- nMedia
| | |-- mMusic

[code]....

View 2 Replies View Related

Fedora :: How To Remove Package Autofs

May 5, 2010

I just used command # yum install -y autofs that work complete but now i want to remove this package.How do i remove this.

View 1 Replies View Related

Networking :: NFS Autofs Can't See Mounted Subdirectory?

Oct 21, 2010

I have a machine (mercury) on which /home/hyperhacker/video is a mounted external hard drive while the rest of /home/hyperhacker is on the internal hard disk. I have a second machine (konata) using autofs to automatically mount mercury:/home/hyperhacker in /mnt/mercury as needed. This works, except /mnt/mercury/video shows up empty.mercury:/etc/exports has: Code: /home/hyperhacker konata(ro,subtree_check)/home/hyperhacker/video konata(ro,subtree_check) and I've tried a few variations in konata: Code: $ cat /etc/auto.master

[...]
+auto.master
/mnt /etc/auto.mercury

[code]....

View 2 Replies View Related

General :: Doesn't Seem To Mount With Autofs

Jun 16, 2011

I have /var/ftp/pub on Computer A being exported via nfs. I'm running defaults, master map file is defined as auto.master in /etc/sysconfig/autofs. On Computer B, I can manually mount the nfs share with no problem. However, it doesn't seem to mount with autofs. I'm running Centos 5.5 on Computer B. I have the following configs

[Code]...

View 4 Replies View Related

Server :: Permissions On Autofs Directory?

May 27, 2011

I'm setting up an automatic mount point on one of my servers. However, for this file I only want certain people (permissions) to access it once it is mounted. I'm figuring I need to place this either on an ACL (via setfacl) or by configuring this in my mount point config file (auto.misc) . Has anyone done this before, restrict use of an auto mounted directory?

[Code]...

View 3 Replies View Related

Server :: Can't Get Autofs To Work On / Home

Apr 12, 2010

Ok, for some reason I can't get autofs to work on /home. I setup a NIS server and wanted to map the /home on the client to the /home on the server with NFS. But I want to use autofs to mount the users' home directories. BUT I get an error every time. Here is my configuration:Turned off firewall and SELinux on both system to rule those out. It works if I use /tmp/home as the autofs mount, but no with /home.

View 4 Replies View Related

Software :: Autofs: -Dvariable=value Not Working?

Jul 29, 2010

I've got a Suse SLES 11 system running automount 5.0.3 which stubbornly refuses to do variable substitution.

friesian:/etc/sysconfig # automount -V
Linux automount version 5.0.3
Directories:

[code]....

View 6 Replies View Related

Ubuntu Networking :: Autofs And Nautilus Replacing Fstab - Browsing?

May 6, 2011

Because of NFS traffic congestion, I am trying to use autofs instead of fstab(NFS) to mount /home and /data directories on our system (from a NFS server). I have it up and running - users can log in and their /home directories work fine. However, when they need to save a file (openoffice or nautilus) they cannot see the directory tree to locate folders for saving. I have tried setting the --ghost option in auto.master, and I have tried commenting the BROWSE_MODE in /etc/default/autofs. But no luck. Using the terminal, I can go a folder and see subfolders using ls -la. They then appear in Nautilus, but later disappear. Since this is a school network, I can't expect teachers and students to use the terminal to save files. They are used to using Nautilus, with our regular NFS mounts.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved