maguire@analyti
04-10-2003, 11:46 PM
Hello all:
I'm still pretty-much a Linux newbie ... so go easy on me! ;-) (Not to mention this is my FIRST post here!)
I'm using RH 8.0, and I'm connecting to a Win98 machine. Everything does and has worked fine when I mount and umount the Win98 machine as root, but...
I want to be able to mount and unmount my Windoze PC *AS A REGULAR USER*! I have been doing it by su'ing to root for quite a while, but now I want to automate it---using a script---and mount and umount the Win98 pc as a regular user.
I'm half-way there. After reading everything that I could find, I finally am able to MOUNT the pc as non-root, by having this in my "/etc/fstab" file:
//my_pc_on_the_lan/c /data/pc smbfs noauto,user,ro,password=<passwd> 0 0
*AND* by making the "/usr/bin/smbmnt" file setuid root (I put "chmod u+s /usr/bin/smbmnt" in the run-level script "S99local"). (Are there any problems/dangers with that?)
Then, as *me* (not root), I can just do a:
%mount /data/pc
or
%mount //my_pc_on_the_lan/c
and it is mounted! Hooray! Unfortunately, I can't figure out how to *UNMOUNT* it! Both:
%umount /data/pc
and
%umount //my_pc_on_the_lan/c
gives me the message: "umount: only root can unmount //my_pc_on_the_lan/c from /data/pc".
What am I doing wrong? The other approach I thought about trying was using automount to do this, but I really should be able to get *this* to work, shouldn't I? (Plus, if I can't get this method to work, I'd probably have a problem automount'ing it anyway! ;-) )
Thanks-much-in-advance,
Bruce.
I'm still pretty-much a Linux newbie ... so go easy on me! ;-) (Not to mention this is my FIRST post here!)
I'm using RH 8.0, and I'm connecting to a Win98 machine. Everything does and has worked fine when I mount and umount the Win98 machine as root, but...
I want to be able to mount and unmount my Windoze PC *AS A REGULAR USER*! I have been doing it by su'ing to root for quite a while, but now I want to automate it---using a script---and mount and umount the Win98 pc as a regular user.
I'm half-way there. After reading everything that I could find, I finally am able to MOUNT the pc as non-root, by having this in my "/etc/fstab" file:
//my_pc_on_the_lan/c /data/pc smbfs noauto,user,ro,password=<passwd> 0 0
*AND* by making the "/usr/bin/smbmnt" file setuid root (I put "chmod u+s /usr/bin/smbmnt" in the run-level script "S99local"). (Are there any problems/dangers with that?)
Then, as *me* (not root), I can just do a:
%mount /data/pc
or
%mount //my_pc_on_the_lan/c
and it is mounted! Hooray! Unfortunately, I can't figure out how to *UNMOUNT* it! Both:
%umount /data/pc
and
%umount //my_pc_on_the_lan/c
gives me the message: "umount: only root can unmount //my_pc_on_the_lan/c from /data/pc".
What am I doing wrong? The other approach I thought about trying was using automount to do this, but I really should be able to get *this* to work, shouldn't I? (Plus, if I can't get this method to work, I'd probably have a problem automount'ing it anyway! ;-) )
Thanks-much-in-advance,
Bruce.