[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

mount NTFS share under RHEL (older version)

Posted on 2010-03-31
6
Medium Priority
?
812 Views
Last Modified: 2013-12-16
I've made a folder with "mkdir -p /mnt/bcmv" and now I would like to mount a windows share if possible

I tried the following, but it did not work:
mount -t cifs //server/bcmv$ -o username=myusername,password=mypassword /mnt/bcmv
mount: fs type cifs not supported by kernel

the I found that in older versions of RHEL smbfs should be used, but got a different error and now I am stuck:
mount -t smbfs -o username=myusername,password=mypassword //server/bcmv$ /mnt/bcmv
1779: session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
SMB connection failed

i can however login to a windows machine as myusername and access the share.
additionally myusername has full share permissions on the share and everyone has full ntfs permissions too

"uname -a" returns the following so what does that make it RHEL 3 or 4
Linux machinename 2.4.21-32.0.1.EL #1 SMP Tue May 17 17:52:26 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

what am I doing wrong and/or how do I mount the share?
0
Comment
Question by:gddl630
  • 4
  • 2
6 Comments
 
LVL 14

Expert Comment

by:ygoutham
ID: 29202293
try using this... i used to have a similar problem with RH9 and mounting shares on them

use the uid= and gid= also in the mount command and see if it works

http://www.experts-exchange.com/Software/Internet_Email/File_Sharing/Samba/Q_22692454.html

mount -t smbfs -o username=ygoutham,password=ygoutham_pass,uid=ygoutham,gid=ygoutham //192.168.0.9/C_Drive /mnt/smb/some_dir_name

change the username, password, uid, gid, and server / share names in the above
0
 
LVL 1

Author Comment

by:gddl630
ID: 29217941
no, but I may be doing something wrong with the values of uid and gid

"id" returns:
uid=0(root) gid=0(root) groups=0(root),507(beoper)

mount -t smbfs -o username=myusername,password=mypassword,uid=root,gid=root //server/bcmv$ /mnt/bcmv
28154: session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
SMB connection failed

where myusername is the windows user that has access to share
root is the linux user
0
 
LVL 14

Expert Comment

by:ygoutham
ID: 29314210
best is not to use root as a user and use it as a simple user.  first add the smbpasswd for the user with the following command

smbpasswd -a <username>

that should give you a simple user who can authenticate to connect to the share.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 1

Author Comment

by:gddl630
ID: 29323944
not sure what you mean how do you use root as simple user - the developer using this machine needs to access the share via this mount path and he wants to do it logged in as root so how is this going to work?

I need a more detailed instructions

smbpasswd -a <username> - what user name is this - another linux user? what password should be used? any or the password of the windows account?

then in the command below, where myusername and mypassword are for the windows user what else needs changing apart from the uid and gid, which should be what <username> above or?
mount -t smbfs -o username=myusername,password=mypassword,uid=root,gid=root //server/bcmv$ /mnt/bcmv
0
 
LVL 14

Expert Comment

by:ygoutham
ID: 29328964
from the windows machine or the machine which has the share add a simple user. not root.  

that is the user that you are going to use in the "mount -o ..." command.  not the local user in the linux machine.  the uid= and the gid= is also the username that you have in the machine which HAS the share and not the linux machine or root.  the share name would not have a $ sign unless it is an administrative name.
0
 
LVL 14

Accepted Solution

by:
ygoutham earned 2000 total points
ID: 29329192
machine A is the computer which has a share name called "sharedfolder".  your developer machine is developer_machine

in MACHINE A
add the user which is not a ROOT user and assign a password for him.  or simply use any of the existing usernames and password.  in this case let us assume XXX

in DEVELOPER_MACHINE (which is a linux machine)
mount -t smbfs -o username=XXX,password=XXXpassword,uid=XXX,gid=XXX //machine_A/Shared_folder_name   /mnt/any/directory
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Welcome back to our beginners guide of the popular Unix tool, cron. If you missed part one where we introduced this tool, the link is below. We left off learning how to build a simple script to schedule automatic back ups. Now, we’ll learn how to se…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question