I found the answers, and I thought I would post them for anyone else who has had the same problem.
To dismount a temporarily mounted device:
Code:
umount /mnt/ntfs
To configure an NTFS share for write and automount:
Code:
# Log onto the Linux computer with the root account
# Create a credential file to hold the Windows username and password
vi .base_linux
cat vi .base_linux
+++ Begin screen output +++
username=my_nt_username
password=my_nt_password
--- End screen output ---
chmod 600 .base_linux
ls -l .base_linux
+++ Begin screen output +++
-rw------- 1 root root 35 Jul 5 23:59 .base_linux
--- End screen output ---
# Determine the uid and gid of the account that will own the directory after it is mounted
id my_linux_username
+++ Begin screen output +++
uid=500(my_linux_username) gid=500(my_linux_username) groups=500(my_linux_username)
--- End screen output ---
# Edit the fstab file (note that uid 500 points to the my_linux_username Linux account)
vi /etc/fstab
(Add a line for //base/linux; see output from "cat /etc/fstab" below)
cat /etc/fstab
+++ Begin screen output +++
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
//base/linux /mnt/base_linux cifs auto,credentials=/root/.base_linux,uid=500,gid=500,file_mode=0777,dir_mode=0777 0 0
--- End screen output ---
# Display the mounted devices
mount
+++ Begin screen output +++
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
tmpfs 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)
--- End screen output ---
# Reload the fstab file
mount -a
# Display the mounted devices
mount
+++ Begin screen output +++
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
tmpfs 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)
//base/linux on /mnt/base_linux type cifs (rw,mand)
--- End screen output ---
ls -l /mnt/base_linux
+++ Begin screen output +++
total 0
drwxrwxrwx 1 my_linux_username my_linux_username 0 Mar 4 22:10 db11g
-rwxrwxrwx 1 my_linux_username my_linux_username 89712640 Mar 4 22:02 oracle.tar
--- End screen output ---
reboot
# (Log onto the Linux machine with the root account)
ls -l /mnt/base_linux
+++ Begin screen output +++
total 0
drwxrwxrwx 1 my_linux_username my_linux_username 0 Mar 4 22:10 db11g
-rwxrwxrwx 1 my_linux_username my_linux_username 89712640 Mar 4 22:02 oracle.tar
--- End screen output ---
# Log onto the non-privileged Linux account
su - my_linux_username
# Display a directory of the files on the NTFS share
ls -l /mnt/base_linux
+++ Begin screen output +++
total 0
drwxrwxrwx 1 my_linux_username my_linux_username 0 Mar 4 22:10 db11g
-rwxrwxrwx 1 my_linux_username my_linux_username 89712640 Mar 4 22:02 oracle.tar
--- End screen output ---
# Write to the NTFS share
touch /mnt/base_linux/temp.tmp
# Display a directory of the files on the NTFS share--the write was a success
ls -l /mnt/base_linux
+++ Begin screen output +++
total 0
drwxrwxrwx 1 my_linux_username my_linux_username 0 Mar 4 22:10 db11g
-rwxrwxrwx 1 my_linux_username my_linux_username 89712640 Mar 4 22:02 oracle.tar
-rwxrwxrwx 1 my_linux_username my_linux_username 0 Jul 6 00:21 temp.tmp
--- End screen output ---
Hie ,
I have a distrib Red Hat with a kernel-2.4.9-31 . I can't mount a ntfs fs with command :
#mount -t ntfs /dev/hda1 /windows
mount: fs type ntfs not supported by kernel
Why doesn't my kernel support a type ntfs ? How can I mount this FS ?
Merci d'avance.. (1 Reply)
How do I mount a Windows 2K share on Redhat Linux?
I tried this: mount -t smbfs -o username=administrator,password=mypassword //machine/share
But it just returns the help for the mount command:( (3 Replies)
I've got a Sco 5.0.6 box and an Ubuntu box on my network. i want to backup certain directories onto a share on the Ubuntu box. how do i mount a linux share onto the Sco box? (1 Reply)
Hello,
I have a few Ubuntu 9.10 laptops I'm trying to learn NFS sharing with. I am just experimenting on this right now, so no harsh words about the security of what I'm playing with, please ;)
Below are the configs
/etc/exports on host
/home/woodnt/Homeschool... (2 Replies)
Hi,
I am using redhat linux 5.1 - 64bit,
using command
mount -t cifs //192.192.192.192/SW/Ex /192.192.192.192 -o username=test
I am getting below error.
mount: block device //192.192.192.192/SW/Ex is write-protected, mounting read-only
mount: cannot mount block device... (3 Replies)
Dear all,
I have a server A and Client B.
I am mounting a folder which is Server A using read and write options in client B.
I have put entries in /etc/exports file as
/mnt1/load *(rw,sync)
In the client i cannot create any new file or delete any file eventhough it is read... (3 Replies)
Hi,
I would like to assign a 10TB LUN to multiple windows servers. On the LUN will be a folder assigned to each server to place its backup.
Is there any change of data corruption with this setup.
Thanks. (2 Replies)
Heyas
At home i have 1 nas with 3 shares, of which i used to mount 2 of them using a script with hardcoded password and username in it.
EDIT: Turns out, its not the script, but 'how i access' the nas share.. (-o user=XY,password=... VS. -o credentials=...).
Figured about credential files,... (0 Replies)