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


ADVERTISEMENT

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 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 :: 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

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

Networking :: Autofs No Longer Working - Finding Source ?

May 23, 2011

After several days of searching, reading and re-installing, I'm at a complete loss as to why autofs has suddenly stopped working.

Basically, I can see the shared folders on the host computer but as soon as I try to cd into the folders I get "-bash: cd: [directory]: No such file or directory" (where [directory] = shared drive).

The setup was working before and the same exact setup is being used and is fully functional on another computer.

I'm running Ubuntu 11.04

Here is the content of auto.cifs:

Code:

Here is the content of auto.master

Code:

And credentials are stored in /etc/auto.smb.goblin (where goblin = name of windows computer sharing folders).

When I do "ls -l /home/shoryuken/TerraDrive/goblin" I get:

Code:

Now if I try to "cd" into any of the shared drives (like D-Drive, GW_Share or TerraDrive) I get the following:

Code:

A second or subsequent attempt at "ls -l" results in:

Code:

Note the question marks that are now everywhere.

I'm not sure where to look to find out why this is failing. The shared drive are visible, but then disappear when I try to access them. The same exact setup, on another machine works perfectly fine.

View 7 Replies View Related

Ubuntu :: Autofs Has Suddenly Stopped Working - Finding Source ?

May 23, 2011

After several days of searching, reading and re-installing, I'm at a complete loss as to why autofs has suddenly stopped working.

Basically, I can see the shared folders on the host computer but as soon as I try to cd into the folders I get "-bash: cd: [directory]: No such file or directory" (where [directory] = shared drive.

The setup used to work and the exact same setup on another computer computer works flawlessly.

I'm running Ubuntu 11.04

Here is the content of auto.cifs:

Code:

Here is the content of auto.master

Code:

And credentials are stored in /etc/auto.smb.goblin (where goblin = name of windows computer sharing folders.

When I do "ls -l /home/shoryuken/TerraDrive/goblin" I get:

Code:

Now if I try to "cd" into any of the shared drives (like D-Drive, GW_Share or TerraDrive) I get the following:

Code:

A second or subsequent attempt at "ls -l" results in:

Code:

Note the question marks that are now everywhere.

I'm not sure where to look to find out why this is failing. The shared drive are visible, but then disappear when I try to access them. The same exact setup, on another machine works perfectly fine.

View 4 Replies View Related

Debian Configuration :: CIFS Stopped Working

Oct 28, 2015

I have a debian box connected to a windows storage server.

For a number of years I have been using CIFS to connect, and now it seems to have stopped working.

Code: Select all~# mount -t cifs //192.168.97.66/sharefolder/ /localfolder -o rw,file_mode=0666,dir_mode=0777,username=NASuser,password=**** -vvv
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "//192.168.97.66/sharefolder/"

[CODE]

View 4 Replies View Related

Fedora :: Mount.cifs After Update Not Working?

Feb 11, 2010

- my windows shares were working fine, since there was aktualization they don't any more

- i have Fedora 12

- my /sbin/mount.cifs und /sbin/umount.cifs have 777 permissions

when I execute my mount with normal user:

/sbin/mount.cifs //sdvbdta01/KADA/ /home/kada/dvb-shares/persoenlich -o user=kada,dom=dvbern,pass=$PASSWD

I get this error:

/sbin/mount.cifs: permission denied: no match for /home/kada/dvb-shares/persoenlich found in /etc/fstab

When I execute that mount with root then it works, but I can't edit documents on that share with normal user

View 2 Replies View Related

CentOS 5 :: Samba CIFS - Mounting Directory On Share

Jul 22, 2009

I've to make a Windows 2000 share on my Server Linux CentOS 5.1 with all the updates installed with yum. I've a directory on a Windows 2000 that contains some images for a catalogue. I have my internet site on CentOS 5.1 with a Apache - Mysql - PHP web server. I have to mount my directory on a share in /mnt/catalogueimages and made a symbolic link from my /var/www/html/mysite/catimages to this samba share.

This is what I do following your guide a this link: [URL]
I have placed in my /etc/fstab this line:
//SERVER/C/Catalogue /mnt/catalogueimages cifs user,username=Administrator,password=,uid=apache,gid=apache 0 0
My Windows 2000 server have no password.

After that I made the symbolic link:
ln -s /mnt/catalogueimages /var/www/html/mysite/catimages
All it's OK.

The problem is that I can't see the images via browser. I have tried also to put some images in the directory /mnt/catalogueimages, deleting the mount point, in order to see if the problem was in apache: the images are visible via browser. Why I don't reach to see the images mounted with samba?

View 9 Replies View Related

CentOS 5 :: Automount Cifs Filesystem Using The Fstab File

Aug 3, 2010

I have been running a server for 3-4 years now, and my shares have been mounting just fine. Well, the network admin looked at a backup and seen that the last date backed up was june. I got to looking around and seen that the share is not mounting. I can mount it with sudo mount -a, which tells me my syntax is correct. I get an error about IPv4 socket not opened and it is aborting the operation when I run dmesg | tail, since I can use the above command to mount later, it sounds to me like it is trying to mount before the network connection is ready.

I have done some looking over some init scripts and found that in the /etc/rc.d/init.r/netfs script it has a line that states that it is checking to see if the network is up before it starts to mount the filesystems and the such. This is set to no, my question is, can I change this option to yes and get my desired results, waiting for the network to be up before it mounts the filesystems.

View 6 Replies View Related

CentOS 5 Networking :: CIFS Mounts Hang When Pushing Data / Resolve This?

Apr 9, 2009

Ive seen this a hundred times while searching google but I can't seem to get any of the fixes suggested to work for me.

Here are the specs code...

I have other servers on the same network with the same software/hardware that never loses its mount to the windows share, and nightly backups are run through those mounts. So why does the mount on this machine fail when we do a push? The only conclusion that I can come to is there is some sort of time out on the windows server that causes this. The other servers that have this same type mount use their share every night, where as the share on this server gets used once or twice a week. Once the mount hangs I can not unmount it, I have to reboot the server. Once the server is rebooted the push works fine. But then the next week when a push is tried it hangs. What else can I check?

UPDATE: I've also tried NFS mounts and autofs mounts and they hang as well

I enabled logging by echo 1 > cifsFYI and this is what I see in var/log/message code...

Ive removed the actual file names for security concerns. Any one have ideas as to why this is happening? The only other thing I can think of to try is to swap out the NIC but it's at a remote location so I can't do that right now.

View 5 Replies View Related

CentOS 5 Server :: Mount Cifs Does Not Work, But Smbclient Does. Empty Directory In First Case?

Feb 18, 2009

I am trying to mount a samba share using an fstab entry

//srv1/Corporate /winfiles cifs user,uid=0,rw,noauto,suid,credentials=/root/wnmount_credentials.txt 0 0

The mount appears to complete cleanly, however when I browse the directory /winfiles it is always empty.The smbclient command works properly using the same credentials.The /root/credentials file looks something like this

username=********
password=********

View 5 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 :: 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

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

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

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

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

Networking :: Autofs Doesn't Mount Directories?

Jan 28, 2011

Hi Linux Forum People! This is my first post. Somehow I'm not able to mount directories from other machine using autofs. Autofs maps successfully loaded into NIS client, but autofs does not recognize them. Please see belowI'm running RHEL4

[root@linux2 etc]# ypcat -k auto.master
/hs /etc/auto.hs
/home /etc/auto.home

[code]...

View 19 Replies View Related

Slackware :: Autofs Mounts, But Doesn't Umount?

Apr 27, 2010

I have some trouble using autofs with Slackware64 13.0I use the alien's script [URL]Here's my auto.master :/mnt/autofs/etc/auto.misc --timeout 20Here's my auto.misc [URL]

View 6 Replies View Related

Fedora :: Setfilecon /dev/autofs Failed: No Such File Or Directory

May 5, 2010

on F12 (2.6.32.11-99.fc12.i686.PAE) autofs/udev generates the following messages at every boot:

Code:

May 5 00:28:30 foo udevd-work[679]: setfilecon /dev/autofs failed: No such file or directory
May 5 00:28:30 foo udevd-work[679]: chmod(/dev/autofs, 020660) failed: No such file or directory
May 5 00:28:55 foo automount[1131]: failed to mount /media/.hal-mtab

The configuration is fairly simple:

Code:

#/etc/auto.master
/media file:/etc/auto.media -browse --timeout=10
#/etc/auto.media

[code]...

View 1 Replies View Related

Fedora Servers :: F13 - LDAP Multiple Direct Map In AutoFS

Sep 18, 2010

I am using LDAP to manage the autofs and everything works fine. I have a situation here that I can't figure out how to do. I need to use 2 direct map in auto.master, but the LDAP service doesn't allow me to add 2 "cn: /-" entries in the directory.

The following is my auto.master map:
dn: ou=auto.master,ou=autofs,ou=dolphin,dc=example,dc= com,dc=my
objectClass: automountMap
objectClass: top
ou: auto.master
dn: cn=/-,ou=auto.master,ou=autofs,ou=dolphin,dc=example,dc =com,dc=my
objectClass: automount
objectClass: top
automountInformation: ldap://ldap.example.com.my/ou=auto.iso.indirect,ou=autofs,ou=dolphin,dc=examp le,dc=com,dc=my
cn: /-

I have another ldap entry auto.data.indirect but I have no idea how to inject it into the directory. Any ideas how to implement it? I am using Fedora 13.

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

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







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