LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-30-2004, 04:20 AM   #1
laikos
Member
 
Registered: Nov 2002
Distribution: Slackware 8.1
Posts: 30

Rep: Reputation: 15
Question Mounting filesystem using C program


Hi All,
I would like to write a simple C program to mount a SAMBA share and NFS share. The share location and user name,password are supplied by the user. Anyone know what are the function to do the mount?

Thanks
 
Old 09-30-2004, 05:48 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Use the mount system function. See "man 2 mount"
 
Old 09-30-2004, 05:56 AM   #3
laikos
Member
 
Registered: Nov 2002
Distribution: Slackware 8.1
Posts: 30

Original Poster
Rep: Reputation: 15
Hi Hko,
Thanks for the hint.
 
Old 09-30-2004, 07:47 PM   #4
laikos
Member
 
Registered: Nov 2002
Distribution: Slackware 8.1
Posts: 30

Original Poster
Rep: Reputation: 15
Hi All,
I still have followon question on this.
How about mounting smbfs
I would like to do
mount -t smbfs -o username=guest,password="",guest //myserver/myshare /mnt/samba
I can't get this to work with the mount. Code sniplet would be really appreciated

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
help:about mounting filesystem ms_sachem Fedora 1 06-13-2005 06:34 AM
mounting filesystem to home? pablowablo Linux - Newbie 2 01-27-2005 07:43 AM
Mounting a filesystem codebox.nl Linux - Software 7 10-21-2004 06:18 AM
Filesystem mounting questions cowboy45 Linux - Newbie 2 05-25-2004 01:14 PM
Mounting HDD vs. Mounting Filesystem snailophone Linux - Hardware 4 08-12-2003 11:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:31 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
Open Source Consulting | Domain Registration