Sponsored Content
Top Forums Shell Programming and Scripting Terminal-specific characters in password Post 302181636 by PittWolfBW on Thursday 3rd of April 2008 12:42:09 PM
Old 04-03-2008
Terminal-specific characters in password

Good morning!

I am using a shell script to back up user email files to a remote location. The problem is, one (and apparently more than one) users have the symbol "@" in their password. As you can see from the line:

/sbin/mount_smbfs //sampleusername:userpassword@home@XXX.XXX.XXX.XXX/mailshare

( Where their user password is: "userpassword@home" )

This then causes the script to believe that the host server name begins earlier than it really does, which causes the mount to fail.

Aside from the obvious answer of having them change their password (and this is a senior research scientist I'm dealing with, so I'm not keen on starting a big issue with them), is there a way to set off the password?

For example, when you try to copy a folder with spaces in the name, you can set it off with double quotes. Is there any such method for the password?

I have already tried single and double quotes already, to no avail. I also tried, on advice from another, to use the backlash just before the @ character within the password. However, this seemed to set off the entire rest of the line, as that yielded the error:

mount_smbfs: server connection failed: No route to host

You would think it wouldn't be a big deal to just have her change her password.. but such is life when dealing with academia.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Understanding terminal display of (awkward) characters

Gurus, I've been on computers for a while, but I've yet to have the behind-the-scenes knowledge. I'm not sure if this is so much a Unix question as it is a nitty gritty computer one. We received a customer file which had a "funny apostrophe." When displaying the file via more, the character... (1 Reply)
Discussion started by: effigy
1 Replies

2. UNIX for Advanced & Expert Users

password verification verify password of a user for only first 8 characters

Helo , I m using linux pam library for user and its password authentication. I m creating new user and giving its password.I m giving password of 10 characters.now when I login in as that newly created user its ask me $ su - ram Password: You are required to change your password immediately... (12 Replies)
Discussion started by: amitpansuria
12 Replies

3. OS X (Apple)

Need help writing an Applescript to launch a specific Terminal Command...

I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In the... (2 Replies)
Discussion started by: JFraser1
2 Replies

4. Shell Programming and Scripting

Write a message on specific user terminal

Hi All, Need urgent help!!! Can anyone tellme how can we send a message on specific user terminal and get a response from user in return. Thanks in advance. (3 Replies)
Discussion started by: Sadhana
3 Replies

5. Shell Programming and Scripting

sed replacing specific characters and control characters by escaping

sed -e "s// /g" old.txt > new.txt While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies

6. Shell Programming and Scripting

Can't figure out how to find specific characters in specific columns

I am trying to find a specific set of characters in a long file. I only want to find the characters in column 265 for 4 bytes. Is there a search for that? I tried cut but couldn't get it to work. Ex. I want to find '9999' in column 265 for 4 bytes. If it is in there, I want it to print... (12 Replies)
Discussion started by: Drenhead
12 Replies

7. Shell Programming and Scripting

Count specific characters at specific column positions

Hi all, I need help. I have an input text file (input.txt) like this: 21 GTGCAACACCGTCTTGAGAGG 50 21 GACCGAGACAGAATGAAAATC 73 21 CGGGTCTGTAGTAGCAAACGC 108 21 CGAAAAATGAACCCCTTTATC 220 21 CGTGATCCTGTTGAAGGGTCG 259 Now I need to count A/T/G/C numbers at each character location in column... (2 Replies)
Discussion started by: thienxho
2 Replies

8. Solaris

Manage ILOM password from terminal

Hi, I have T5240/M9000 servers running Solaris 10. I want to manage root password from terminal only using scadm command. Can somebody help me on this? Which package do I need to install and what all configuration need to be done? Thanks, Prashant (1 Reply)
Discussion started by: prashant2507198
1 Replies

9. UNIX for Dummies Questions & Answers

Questions About Using Escape characters ('\') In Terminal

I have been looking at people posting commands like : $ sudo apt-get install git gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ libgl1-mesa-dev g++-multilib mingw32 tofrodos... (2 Replies)
Discussion started by: Ryuinferno
2 Replies

10. Shell Programming and Scripting

Kill specific terminal using shell/bash

Hello elite shell/bash specialists, I have done plenty of STFW and some RTFM, but I cannot find a clear solution to my challenge Goal: My goal is to have a script(of any language, preferably shell/bash/anything that can run things on unix), which will kill specific unix terminal windows for... (0 Replies)
Discussion started by: kamil-mech
0 Replies
asadmin-update-file-user(1AS)					   User Commands				     asadmin-update-file-user(1AS)

NAME
asadmin-update-file-user, update-file-user - updates a current file user as specified SYNOPSIS
update-file-user --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] [--userpassword user_password] [--groups user_groups:[user_groups]*] [--authrealmname auth_realm_name] user_name DESCRIPTION
Updates an existing entry in keyfile by the specified user_name, user_password and groups. Multiple groups can be entered by separating them, with a colon, ":". If the auth_realm_name is not specified, an entry is created in the default keyfile. If auth_realm_name is speci- fied, an entry is created in the keyfile where the auth-realm name in the domain.xml file points to. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. --userpassword password for the file user. --groups group where the file user belongs to. --authrealmname name, in the domain.xml file, where you have different stores for file auth realm. OPERANDS
user_name name of file user. EXAMPLES
Example 1: Using the update-file-user command asadmin> update-file-user --user admin1 --password adminadmin1 --host pigeon --port 5001 --userpassword sample_password --groups staff:manager:engineer --authrealmname auth-realm1 sample_user Command update-file-user executed successfully Where: the sample_user is the file user updated with the updated user password and groups. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-delete-file-user(1AS), asadmin-list-file-users(1AS), asadmin-create-file-user(1AS), asadmin-list-file-groups(1AS) J2EE 1.4 SDK March 2004 asadmin-update-file-user(1AS)
All times are GMT -4. The time now is 02:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy