Find the answer to your Linux question:
Results 1 to 6 of 6
Hey guys, I am starting to dabble in Linux these days and finally installed linux on 2 of my boxes (2 windows game machines, and 2 linux machines). I have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2002
    Posts
    15

    Mounting Drives automatically and as normal user?


    Hey guys, I am starting to dabble in Linux these days and finally installed linux on 2 of my boxes (2 windows game machines, and 2 linux machines). I have been using it for about a month, and really liking it. The problem I have is this:

    I mount a SMB drive like this:

    mount -t smbfs //192.168.1.3/shared /mainshare -o username=xxx, password=xxx

    It works fine, but I have two issues:

    1) How can I mount this every time Linux starts?

    and

    2) When working in the drive, if I am root, I can create, delete, modify etc all the files in the drive, however, when I am a normal user, I cannot. How can I give the normal user the same rights on that folder as root?

    Any and all help is appreciated.

  2. #2
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    1. To start it at boot time, you can add it to your /etc/fstab file.

    2. If it's a shared folder, u will have to make sure that the computer the share's on has write privileges to that share, and then when shared, should allow u to write to it.
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  3. #3
    Just Joined!
    Join Date
    Oct 2002
    Posts
    15
    Well I know its not a problem with the remote machine because when I try as root (on my local machine), I can create/edit fine, but when I mount the drive as root, but then try to edit the files as non-root, it doesnt work.

    I tried chmod +777 /mainshare as root, but it wouldnt let me do that on remote folders.

  4. #4
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    I am not too sure about mounting drives as a user, i haven't really had a lot of experience with samba shares recently, so can't remember too well....

    Why do u need to mount it as a user? If you mount it as root, can u write to it as a user?
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  5. #5
    Just Joined!
    Join Date
    Oct 2002
    Posts
    15
    Nope, thats the problem I am having

    WHen I mount as root, I can write/read to it, but when I 'exit' out of su mode, I lose that capability to write.


    Sorry if I wasn't clear on the original question.

  6. #6
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    Code:
     //192.168.0.1/home /mnt/home smbfs workgroup=MY_WORKGROUP,username=my_username,password=my_password,user 0 0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •