Operating System - HP-UX
1837262 Members
2430 Online
110115 Solutions
New Discussion

Re: Cannot automate CIFS Mount

 
SOLVED
Go to solution
Ian Dennison_1
Honored Contributor

Cannot automate CIFS Mount

I cannot get the command right for CIFS mount in the /etc/fstab. What am I doing wrong?

cifsmount -U MilesReports -P XXXXXXXX //s869a111.corpds.net/MilesReports /mnt/reports

The above command works OK.

# cifslogin -U MilesReports -P XXXXXXXX s869a111.corpds.net -s

# grep cifs /etc/fstab
//s869a111.corpds.net/MilesReports /mnt/reports cifs defaults 0 2
# mount /mnt/reports
mount: //s869a111.corpds.net/MilesReports: No such file or directory
#

I could create a custom script for the init.d directory, but am more concerned about what else I am missing functionality wise.

Easy points for a good configurer. Share and Enjoy! Ian
Building a dumber user
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: Cannot automate CIFS Mount

Ian,

My fstab man pages make no mention of CIFS. As a matter of fact the only FSTypes mentioned are hfs, vxfs, cdfs, nfs, or lofs.

Are you certain this is supported?


Pete

Pete
Yang Qin_1
Honored Contributor
Solution

Re: Cannot automate CIFS Mount

Hi, Ian,
remove "//" in front of host name, "mount" dosen't use "//" to identify host name, instead it uses ":"

s869a111.corpds.net:/MilesReports /mnt/reports cifs defaults 0 2

or better to edit your hosts file so that you can use "short" hostname.

s869a111:/MilesReports /mnt/reports cifs defaults 0 2


Yang
Ian Dennison_1
Honored Contributor

Re: Cannot automate CIFS Mount

Qin,

Thats got it, thanks very much!

Share and Enjoy! Ian
Building a dumber user
Victor BERRIDGE
Honored Contributor

Re: Cannot automate CIFS Mount

Hi Ian,
This is the way I see things ( and so can be wrong...)
I dont see how it can work, because you have to be connected first (-U MilesReports -P XXXXXX...) before it can be mounted...
This is an example of a cron file:
/usr/sbin/mount -F cifs horloge:/d /sm/import/horloge && \
/sm/cron/bin/get_uxfiles

cd /sm/cron; /sm/cron/bin/append_date && \
/usr/sbin/umount /sm/import/horloge

As you see this syntax would work in fstab, since there is no user/passwd and uses the mount and not cifsmount.
For this I had to create a passwd DB for CIFS client, so root can mount after without being asked a account on the MSbox..., only I forgot how but Im sure you will find reading the man pages.
I will try to look...

All the best
Victor
Ian Dennison_1
Honored Contributor

Re: Cannot automate CIFS Mount

Victor,

I think the fact that it works is due to the fact that I already submitted the userid/password using "cifslogin" that allows me to do this.

I am rolling out another identical system, I will try a "clean" cifs mount without the messing about and see if it still works.

Share and Enjoy! Ian
Building a dumber user