Mount a volume


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mount a volume
# 1  
Old 08-14-2014
Mount a volume

Hi,

I dig up an old topic because I don't find the solution with shell but with applescript

Code:
mount volume "smb://MyIP/itransfert/Public/1-Arrivees" as user name "MyIP\\itransfert_cs" with password "MyPassword"

Otherwise I would want to know the reason it doesn't work with bash:
I have a problem with the command mount with a password with special character

Code:
mount -t smbfs '//itransfert_cs:password@IP/itransfert/1-Arrivees/Vers_K2' /share

the password contain a * and a @

I try to quote but doesn't work, replace the @ with %40 and try to escape with \ but doesn't work…
I don't understand…
I'm working with apple bash

Last edited by rbatte1; 08-14-2014 at 07:28 AM.. Reason: Adding ICODE tags, capital letters and others
# 2  
Old 08-14-2014
1. you can escape special characters in password
2. or since there are no spaces in the string,
Code:
mount -t smbfs //itransfert_cs:'password'@IP/itransfert/1-Arrivees/Vers_K2 /share

# 3  
Old 08-14-2014
Quote:
Originally Posted by SriniShoo
1. you can escape special characters in password
2. or since there are no spaces in the string,
Code:
mount -t smbfs //itransfert_cs:'password'@IP/itransfert/1-Arrivees/Vers_K2 /share

Sorry but already try and don't work with quote and double quote
# 4  
Old 08-14-2014
This is a long shot...

Have you tried double escaping?

Assume the password is abc*abc@abc

Try this for you password "abc\\*abc\\@abc"

Note the quotes and the double escaping...
# 5  
Old 08-14-2014
Quote:
Originally Posted by wisecracker
This is a long shot...

Have you tried double escaping?

Assume the password is abc*abc@abc

Try this for you password "abc\\*abc\\@abc"

Note the quotes and the double escaping...
Thx, i dont try this...i will test it tomorrow at my job.
# 6  
Old 08-14-2014
I'd guess that the @ character in the password is really screwing things up.

Assuming you're running MacOS, you should have dtrace, right? You could use dtruss to follow the mount command and see what it's actually trying to do:

Brendan's blog » Top 10 DTrace scripts for Mac OS X

Last edited by rbatte1; 08-14-2014 at 11:59 AM.. Reason: ICODE
# 7  
Old 08-14-2014
I have some servers that treat @ as 'end of password', so I avoid it all the time in my passwords now. I think they are HP-UX, but there must be an original standard that was followed when this became a problem. It's annoying enough having to change so many passwords, but when the rules of what is allowed vary, it becomes worse. I just avoid @ entirely now.

I've also had problems with £ & #


Robin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

"Please mount volume 2 on /dev/rmt0.1" message during mksysb restore

Dear all First of all, my English not so good. We have p52a (production server) and p52a (test server). Tape drives are VXA2. When both servers were AIX 5.3, mksysb on production server and restoring to test server was OK. The production server was AIX 5.3 and recently upgraded to... (3 Replies)
Discussion started by: fifa15pc
3 Replies

2. Solaris

In Solaries 10 how to mount multiple volume on same mounted point

Hi , I am completely stuck and not getting any clue to come out this . So looking for help Q : I have salaries 10 in server with that Dell Equallogic storage connected. in dell Equlalogic in i have 70 TB storage . I created 7 volumes 10 TB each . In Solaries 10 i have syslog server i... (1 Reply)
Discussion started by: Roahn Tiwari
1 Replies

3. OS X (Apple)

Mount my volume on remote machine

I have the need to Mount one of my volumes (All machines are mac) onto all of the machines in the lab from time to time. At the moment I'm using SSH to tunnel into each machine and then send a command to the remote machine to mount my volume using AFP. This seems convoluted to me. Is there a... (3 Replies)
Discussion started by: TheDrizzle
3 Replies

4. UNIX for Dummies Questions & Answers

Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition

Hi, I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies 1)Physical Volume 2)Volume Group 3)Logical Volume 4)Physical Partition Please help me to understand these concepts. (6 Replies)
Discussion started by: kashifsd17
6 Replies

5. Solaris

Mount A ZFS volume

Is there any way i can mount a zfs volume using snapshot or some other means ? (2 Replies)
Discussion started by: fugitive
2 Replies

6. Ubuntu

cannot mount volume

Hi I have recently install ubuntu on my laptop. I have tried to access my external drive wich is NTFS format but i get the following error: “Cannot mount volume“ Can someone help me please?? (2 Replies)
Discussion started by: DDoS
2 Replies

7. HP-UX

/usr out of disk space need to unmount/ expand volume /mount

Greetings, I am running HP-UX 10.2 and /usr is out of disk space already. I installed IE 5.0 for UNIX on my machine under /usr and browsed the Internet for a while and presto no more disk space. I have plenty of hard disk space on my computer so would like to expand the size of the volume. The... (5 Replies)
Discussion started by: Dirk_
5 Replies

8. OS X (Apple)

howto mount mac volume on suse 11

as the title states, i cant mount suse of apple volumes on either box. have tryed afpfs-ng but no love. anyone have a suggestion than samba (because i dislike MS) and NFS because i don't know jack about it..... yet thanks in advance julz (4 Replies)
Discussion started by: biorhythm
4 Replies

9. Red Hat

how to mount SAN volume with its increased size

Hi, We have 200GB SAN volume mounted on Redhat EL 5. which is working fine. As my SAN supports dynamic resizing of volumes, i unmounted the volume and resized the SAN Volume to 300 GB successfully. Then i mounted again but it shows 200GB only but data is intact. Now, my requirement is to let... (3 Replies)
Discussion started by: prvnrk
3 Replies

10. UNIX for Dummies Questions & Answers

After changing permissions, volume wont mount

Ok. Here it is. I limited access to my external hard disk's partition/volume on Mac os X simply by changing permissions in Get Info window. But now the hard disk icon has disappeard and wont mount. Have tried different kind of soft to mount, but no luck. Then there is the utility called Terminal,... (0 Replies)
Discussion started by: meelismalgand
0 Replies
Login or Register to Ask a Question