How to mount disk for non-root accounts?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to mount disk for non-root accounts?
# 1  
Old 03-12-2007
How to mount disk for non-root accounts?

I have a USB disk on a little NAS controller (NSLU2 running unslung 6.8) that I can access nicely with root with

mount -t cifs \\\\10.134.23.23\\DISK\ 2 /mnt/LKGD7F73A

However, when I run emacs from an user mode xterm prompt, emacs cannot read and write the files on /mnt/LKGD7F73A. Emacs can see the file but it says the file is not readable.

However, if I start emacs from a root console mode prompt, it can read and write the files.

I did a google search and read that I need to do a "umount /mnt/LKGD7F73A; chmod 777 /LKGD7F73A " and remount but this did not work.

How do I do this? Is there a procedure that will work for fd0 and other devices?

What can I put in fstab so /mnt/LKGD7F73A will automount?

In addition, what command can I use from the bash prompt (running as root) so other uses can access the mounted disk?

Thanks,
Siegfried
# 2  
Old 03-12-2007
Dos this work for you?
Code:
mount -t cifs -o uid=<non_root_uid> \\\\10.134.23.23\\DISK\ 2 /mnt/LKGD7F73A

where <non_root_uid> is the uid of your user?
# 3  
Old 03-12-2007
progress

Thanks! That is progress! How do I make it available for all non-root accounts?
Thanks,
Siegfried
# 4  
Old 03-12-2007
I'm not really sure. Try with gid instead of uid and give the group rw permissions. If necessary create an new group add all the users to that group.
# 5  
Old 03-17-2007
Still cannot read files on debian

I'm confused as I cannot detect the pattern yet. The solution of putting "-o uid=siegfried" did solve the problem on one distribution and I thought I had the problem solved. I think I was able to use it on ubuntu to burn a CD using nautilus.

But now I am on debian etch and I tried that trick again with

mount ... -o uid=siegfried,username=siegfried

and emacs comes back and says the file is not readable. So then I have to switch to my xterm running in root and copy the file from the samba share to a local copy where I can edit it in emacs.

So what else do I have to do so emacs can read and write files on the samba share? Root can do it but the siegfried account cannot. The siegfried account can see the file names and traverse the directories, however. That is progress!
Thanks,
Siegfried
# 6  
Old 03-17-2007
It should work the same way on etch. I don't know what the problem might be there, as a workaround, you could mount it up on the one that works and nfs share it from there to any other machines that need to use it, just make sure you keep the uid for siegfried consistent on all the machines.
# 7  
Old 03-17-2007
Trouble using NFS

I was having trouble using Samba and NFS and I finally solved (one of) my Samba problems by remembering to use smbpasswd. I wish the authors of the samba client setup would put a little push button and edit box that would remind you to run smbpasswd by clicking on the button. Oh well.

Is there an NFS counterpart to smbpasswd that I need to use? I enabled NFS shares via the nice GUIs (I love these new GUIs on all the distros, I just wish they would work) but I cannot see visit the shares from windows explorer or by using the unix mount command. I get connection refused.

Thanks,
Siegfried
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

How to check local accounts have root and user access rights ?

Hi, I have three servers,For 3 servers how i can take output,all the local accounts and details of whether the access is Root or User access. cheers (1 Reply)
Discussion started by: ranjithm
1 Replies

2. Solaris

Lost Root Password on VXVM Encapsulated Root Disk

Hi All Hope it's okay to post on this sub-forum, couldn't find a better place I've got a 480R running solaris 8 with veritas volume manager managing all filesystems, including an encapsulated root disk (I believe the root disk is encapsulated as one of the root mirror disks has an entry under... (1 Reply)
Discussion started by: sunnyd76
1 Replies

3. Shell Programming and Scripting

I have a requirement to check whose accounts are expired in Linux machine and send a mail to root

I have a requirement to check whose accounts are expired in Linux machine and send a mail to root user about the accounts. How can i achieve this in Linux? (1 Reply)
Discussion started by: mnmonu
1 Replies

4. Shell Programming and Scripting

if (disk is mounted) unmount if (disk is unmounted) mount

Hey there, sorry if this is a bit too much of a noob question, trying to get to grips with a simple bash script - but i have done ZERO bash scripting. basically having worked out how to mount and unmount disks using: disktool -m *device* & disktool -e *device* - and looking at the result of... (2 Replies)
Discussion started by: hollister
2 Replies

5. Linux

How to mount/umount disk from a non-root account

Is it possible to mount a disk from a non-root account? I'm developing a Java application which executes commands in the shell using the java.lang.Runtime.exec api, which runs fine for commands ls, df, etc., but for commands mount and umount, i have problems as I need to be root to eecute these.... (8 Replies)
Discussion started by: brendan76
8 Replies

6. UNIX for Dummies Questions & Answers

How to mount disk for non-root accounts?

Presently I have mounted a disk as su. I believe only root can mount disks -- is this correct? I had to run mozilla in the root account so I can download the new SuSE distribution to the new disk. How can I mount the disk so non-root accounts can access the disk? Thanks, Siegfried (4 Replies)
Discussion started by: siegfried
4 Replies

7. UNIX for Advanced & Expert Users

unixware 7.1.3 can't mount root

please help me about unixware 7.1.3 -------------------------------------------------------------------------------- msg: vfs_mountroot:cannot mount root %%%%%% system don't start (1 Reply)
Discussion started by: hushboy
1 Replies

8. UNIX for Dummies Questions & Answers

How do i access (mount, read & write) a floppy disk from the console, not being root?

welll, the title quite explains what i want to do thanks for your time! (4 Replies)
Discussion started by: kfaday
4 Replies

9. UNIX for Advanced & Expert Users

Hw to create root-equivalent accounts?

Hi all. After installing ssh on a server, i'd like to create a user with root privileges. My problem is that after creating a user rootssh (uid=0, gid=20, /home/rootshh), i make rootssh's ssh keys. The problem is that normally the ssh-keygen should create the keys under $HOME/.ssh/, and actually... (6 Replies)
Discussion started by: penguin-friend
6 Replies
Login or Register to Ask a Question