Automount issues for cifs file type on CentOS 4.4

Issues related to software problems
Post Reply
ramprasadb
Posts: 2
Joined: 2008/11/05 11:57:55

Automount issues for cifs file type on CentOS 4.4

Post by ramprasadb » 2008/11/05 12:06:52

Hi list,

I have configured automount to mount cifs shares to my CentOS 4.4 systems.

I get the following message -

[root@centos-test2]# cd sample
-bash: cd: sample: No such file or directory

Details are below -

[root@centos~]# cat /etc/redhat-release
CentOS release 4.4 (Final)
[root@centos~]#

[root@centos~]# cat /etc/auto.master
/test2 /etc/auto.test
[root@centos~]# cat /etc/auto.test
sample -fstype=cifs,rw,username=user,password=pass ://xxx.xxx.xxx.xxx/Share
[root@centos~]#

[root@centos~]# mount
/dev/hda3 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
automount(pid25512) on /test1 type autofs (rw,fd=5,pgrp=25512,minproto=2,maxproto=4)
automount(pid26575) on /test2 type autofs (rw,fd=5,pgrp=26575,minproto=2,maxproto=4)

[root@centos~]# /etc/init.d/autofs reload
Checking for changes to /etc/auto.master ....
Reload map /usr/sbin/automount --timeout=60 /test2 file /etc/auto.test

[root@centos~]# cd /test2

[root@centos-test2]# cd sample
-bash: cd: sample: No such file or directory

[root@centos-test2]# mount
/dev/hda3 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
automount(pid25512) on /test1 type autofs (rw,fd=5,pgrp=25512,minproto=2,maxproto=4)
automount(pid26575) on /test2 type autofs (rw,fd=5,pgrp=26575,minproto=2,maxproto=4)

Please help me on this. I could not get a solution on this from internet.

Thanks in advance for your help!

Regards,
Ramprasad B

User avatar
toracat
Forum Moderator
Posts: 7386
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Automount issues for cifs file type on CentOS 4.4

Post by toracat » 2008/11/05 13:21:08

First, are you able to mount the same share if you do not use autofs? In other words, is the trouble related to automounting?

Second, can you see the share using smbclient? Like:

smbclient -L xxx.xxx.xxx.xxx -U username

ramprasadb
Posts: 2
Joined: 2008/11/05 11:57:55

Re: Automount issues for cifs file type on CentOS 4.4

Post by ramprasadb » 2008/11/06 10:43:19

Yes, i am able to mount the cifs without autofs - through static mounts (FSTab).

I can even do smbclient to the remote windows system and see the shared files.

Thanks,
Ramprasad

Bassu
Posts: 2
Joined: 2009/09/08 09:19:03

Re: Automount issues for cifs file type on CentOS 4.4

Post by Bassu » 2009/09/08 09:38:40

Hi Ramprasad,

I tried the following method and i was able to mount the files using AUtomount CIFS.


1. Before you start mounting the files using CIFS, you have to install the dependent packages for CIFS.
You can do this by the command "yum install cifs".

2. After this, you edit your "/etc/auto.master" and the "/etc/auto.test".

3. Restart the autofs daemon.
NOTE: As it is automount, no need to start the daemon, if not started, you can start daemon by using the command "/etc/init.d/autofs restart".

4. Now check folder for the mounted files.


[root@cent32b44-test ~]# cat /etc/redhat-release
CentOS release 4.4 (Final)
You have new mail in /var/spool/mail/root
[root@cent32b44-test ~]# cat /etc/auto.master
/auto /etc/auto.test
[root@cent32b44-test ~]# cat /etc/auto.test
nfs -rw,resvport,hard,vers=3,intr,tcp xxx.xxxx.xxx.xxx:/opt
nfsmount -rw,soft,intr,resvport,rsize=8192,wsize=8192 xxx.xxxx.xxx.xxx:/opt
cifsmount -fstype=cifs,rw,domain=xxxxxads,username=administrator,password=xxxx ://xxx.xxxx.xxx.xxx/Share
[root@cent32b44-test ~]# ls /auto/cifsmount
Gangs GDBforMac GDB for Solaris MSNMessenger sudo-1.6.9p14.tar.tar imagetool.zip New Domain suneetha
part 2 New Folder suresh
[root@cent32b44-test ~]#

User avatar
toracat
Forum Moderator
Posts: 7386
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Automount issues for cifs file type on CentOS 4.4

Post by toracat » 2009/09/08 12:15:52

[quote]
Bassu wrote:

1. Before you start mounting the files using CIFS, you have to install the dependent packages for CIFS.
You can do this by the command "yum install cifs".
[/quote]
There is no package called "cifs" in CentOS. Automounting using cifs should work fine without installing anything extra in CentOS.

User avatar
AlanBartlett
Forum Moderator
Posts: 9323
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Automount issues for cifs file type on CentOS 4.4

Post by AlanBartlett » 2009/09/08 15:05:40

I note that the OP is using [i]CentOS 4.4[/i]. :-o

That is (as of the date of this posting) four point releases out of date -- I wonder if that has any relevance on the [i]automount[/i] issue . . . :-?

Bassu
Posts: 2
Joined: 2009/09/08 09:19:03

Re: Automount issues for cifs file type on CentOS 4.4

Post by Bassu » 2009/09/11 10:03:08

Here when you run the command "yum install cifs" in Cent OS 4.4 32 Bit, dependent files will install (ie the dependent files are not installed when you install the OS.) These dependent files will be installed with OS in post CentOS 4.4 versions.

CentOS 4.4 32 Bit:
----------------------

[root@cent32b44-test ~]# yum install cifs
Setting up Install Process
Setting up repositories
update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 83 kB 00:00
update : ################################################## 287/287
Added 287 new packages, deleted 0 old in 3.37 seconds
primary.xml.gz 100% |=========================| 611 kB 00:00
base : ################################################## 1599/1599
Added 1599 new packages, deleted 0 old in 22.55 seconds
primary.xml.gz 100% |=========================| 190 B 00:00
Added 0 new packages, deleted 0 old in 0.02 seconds
primary.xml.gz 100% |=========================| 33 kB 00:00
extras : ################################################## 130/130
Added 130 new packages, deleted 0 old in 1.36 seconds
Parsing package install arguments
No Match for argument: cifs
Nothing to do
[root@cent32b44-test ~]#


CentOS 5.3 64 Bit:
----------------------

[root@centos64b53 bin]# yum install cifs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.iitm.ac.in
* updates: ftp.iitm.ac.in
* addons: ftp.iitm.ac.in
* extras: ftp.iitm.ac.in
Setting up Install Process
Parsing package install arguments
No package cifs available.
Nothing to do
[root@centos64b53 bin]#

There is no issues in automounting the CIFS files in latest Cent OS versions.

[root@centos64b53 ~]# cat /etc/auto.master
/auto /etc/auto.test
[root@centos64b53 ~]# cat /etc/auto.test
nfs -rw,resvport,hard,vers=3,intr,tcp xxx.xxx.xxx.xxx:/opt
nfsmount -rw,soft,intr,resvport,rsize=8192,wsize=8192 xxx.xxx.xxx.xxx:/opt
cifsmount -fstype=cifs,rw,domain=xxxxxxxxads,username=administrator,password=xxxx ://xxx.xxx.xxx.xxx/Share
[root@centos64b53 ~]# ls -l /auto/cifsmount/
total 74384
-rwxrwSrwx 1 root root 331776 Mar 20 2008 Document_for_creating_BulkUsers_in_ADUC.doc
drwxrwxrwx 1 root root 0 Apr 6 15:00 Gangs
drwxrwxrwx 1 root root 0 Aug 25 13:26 GDBforMac
drwxrwxrwx 1 root root 0 Mar 25 17:03 GDB for Solaris
[root@centos64b53 ~]#

Post Reply

Return to “CentOS 4 - Software Support”