Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-29-2004, 02:19 PM   #1
LQ Newbie
Registered: Mar 2004
Distribution: Red Hat
Posts: 10

Rep: Reputation: 0
alias to an SMB Mount

I mount a remote SMB volume using the following command:

smbmount //(Computer name or IP)/(Shared Directory) /(Directory to mount point) -o username=(username to access the share),password=(password for the share)

It's a bit cumbersome to type everytime I log in, so I tried to create an alias. I found another site which talked about this, and I edited .bashrc in my home folder. The article said it's used for mounting local floppy or DC drvies, but thought I would try with smbmount. I added:

alias mountmac="smbmount //(Computer name or IP)/(Shared Directory) /(Directory to mount point) -o username=(username to access the share),password=(password for the share)"

The next time I launched a terminal, I got a message that 'the alias moutmac' could not be found. Is this the correct way to go about this? Also, entering that command forces me to type my password in plain text, so I would have to store my password to the SMB share in a text file. Is there a way around this?

Many thanks,
Old 05-04-2004, 10:31 AM   #2
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
does this work maybe:

alias mountmac="mount -t smbfs -o username=<username>,password=<password> //<address>/<sharename> /<mountpoint>"

.-=~ iluvatar ~=-.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 12:34 PM
smb mount folders disappear on mount & konqueror smb fails: network unreachable tisource Linux - Networking 1 10-17-2007 01:30 AM
"hosts allow" in smb.conf expects only FQDN, not alias or netbios name!? Not now, John! Linux - Networking 1 10-13-2006 06:17 AM
Alias for a Mount Folder / Partition Deiota Linux - Software 5 10-15-2004 07:21 AM
problem creating an alias to mount a drive j_l_ajaste Linux - Newbie 6 07-01-2003 11:41 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration