Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hello, Im new to linux. I have just installed and configured samba. How do you map a network drive e.g. smb://server/folder/ so that I can access it. I would preferably ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2003
    Posts
    15

    maping network drives in Linux


    Hello, Im new to linux. I have just installed and configured samba.
    How do you map a network drive e.g. smb://server/folder/ so that I can access it. I would preferably like this to be iniatied as part of the login script, so that different users map different folders?!

    Does anyone understand what Im going on about?

    p.s Im running yellow-dog-linux on a PowerPC G3.

    Please help, im stuck!

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    do these to commands:

    "mkdir /mnt/something"

    "mount -tsmbfs //server/share /mnt/something -o username=<USERNAME_HERE>,password=<PASSWORD_HERE>"

    obviously, replace <USERNAME_HERE> and <PASSWORD_HERE> with a valid username/password that can be used to access that share. also, //server/share is the NETBIOS name of the pc (in example, "server" and the sharename "/share".

    Im not sure exactly where your statup files are on yellowdog, run "updatedb", then run "locate rc.local". put your commands in the rc.local file it finds.

    all your files on the share will be accessable like normal files on the local system from /mnt/something

    PS: you only need post the question once

    Jason

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    You can also try the smbmount command (man smbmount).
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  4. #4
    Just Joined!
    Join Date
    Jul 2003
    Posts
    15

    Still a problem with mount

    Hi, i can type smb://it-staff/staff/okh/ into the browser, and has no problem connecting to the NT server. But when I type in:

    mount -tsmbfs //it-staff/staff/okh /mnt/login -o
    username=ME,password=PASSWORD

    it comes up with the following message:
    5276: Tree connection failed: ERRDOS - ERRnosuchshare

    I quess it cant connect to the shared folder, but why? I dont understand, i can connect to the folder using a web browser on the linux machine using smb://

    There is a directort setup in mnt called login.

    But it wont work, can you please help?!

  5. #5
    Just Joined!
    Join Date
    Jul 2003
    Posts
    15
    Also how do you un-mount the drive once its mounted?

  6. #6
    Just Joined!
    Join Date
    Jul 2003
    Posts
    15
    Ok I figured out how to unmount a drive:
    umount/mnt/login

  7. #7
    Just Joined!
    Join Date
    Jul 2003
    Posts
    15
    I figured out how to mount the //it-staff/staff/share all you have to do is missout the second diretory so you type
    //it-staff/share

    Wahoo,

    Now how do I add this command so that when a user logs into a this linux box it maps that drive? And so that when a different user logs in he does not see this mount??????

    Any ideas?

  8. #8
    Just Joined!
    Join Date
    Jul 2003
    Posts
    15
    Ive figured it out, you edit the .bashrc file located in the Home/username/
    and type the command mount -t there!

    Cool sorted, but for only small problem, only the root can mount as drive!
    Well I can only do so much!

  9. #9
    Linux User
    Join Date
    Jun 2003
    Location
    Calgary, AB CANADA
    Posts
    496
    Quote Originally Posted by okhorne
    Ok I figured out how to unmount a drive:
    umount/mnt/login
    Probably one of the biggest newbie mistakes is trying to unmount using the obvious command unmount, instead of dropping the first 'n'...

    I'm man enough to admit that I fell into that trap myself.
    \"Everything should be made as simple as possible, but not simpler.\"
    Albert Einstein

  10. #10
    Just Joined!
    Join Date
    May 2005
    Posts
    1
    I have tried both 'mount' and 'smbmount' and cant get either of them to work correctly. The computer I am trying to mount a drive to is "//server/archive"

    mount -t smbfs //server/archive /mnt/archive -0 username=<Pat Spencer>,password=<Avepoh1>
    -bash: syntax error near unexpected token 'newline'

    I can do smb://server/archive and it will come up and ask for a username and password, If i put those in it will connect and work just fine. Im just not sure what im doing wrong with 'mount'

    Thanks,
    Pat

Page 1 of 2 1 2 LastLast

Posting Permissions

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