Sponsored Content
Top Forums Shell Programming and Scripting Script to transfer files from Solaris to windows Post 302936115 by rbatte1 on Monday 23rd of February 2015 06:13:57 AM
Old 02-23-2015
Well, without wishing to be cruel, it looks like your credentials are wrong. Can you do this interactively before we try to automate it?

I've fallen over this myself as we have Windows domains to consider. If the account you are trying to connect to is a domain wide account rather than an account local to the server, you need to qualify it. You might try variations like this for your USER value:-
Code:
USER="mydomain/user1"
USER="mydomain\/user1"
USER="mydomain\\user1"
USER="mydomain\\\\user1"

The extra \ characters are because the / & \ may be getting interpreted by your shell script and when they are fed into the actual ftp it's getting lost.

I've had different variations for different target servers. No idea why the variation.


Looking again closely at your output, the prompt being sent is 331 Password required for user user1 v7st which also suggests that you might need to break the input, so instead of user $USER $PASSWD you might need:-
Code:
user $USER
$PASSWD




I hope that one of these helps,
Robin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script to transfer files from Unix to Windows

I need to write a shell script to transfer files from Unix server to windows machine. This script will be scheduled on scheduler to run at specified intervals #!/bin/ksh ftp -n alaska <<End-Of-Session user sss01 sample cd /home/sss01 lcd D:/sample mget *.txt bye when I executed the... (15 Replies)
Discussion started by: knag
15 Replies

2. UNIX for Advanced & Expert Users

How to transfer files from Unix to Windows.

Hi There is a requirement for me to transfer files from Unix to windows in an automation process of unix. Please let me know is it posibble to shell scripting this? Could you help me in scripting it? Regards Venugopal (2 Replies)
Discussion started by: venu_eie
2 Replies

3. Solaris

Transfer files from Solaris to windows

Please let me know a efficient way to transfer files from a solaris to a windows machine. Total size of data is 800GB. (3 Replies)
Discussion started by: pingmeback
3 Replies

4. Shell Programming and Scripting

Unable to transfer files from Windows 2000 Server to Sun Solaris..

Dear Friends, I need to transfer few files from a Windows 2000 server to Sun Solaris system, connected in the same network. This copy should be done as a batch job without asking for password to be entered every time. How to make this possible ??? At present I am using cygwin in my laptop... (4 Replies)
Discussion started by: ks_reddy
4 Replies

5. HP-UX

Transfer Files from Windows to HP-UX

I need to transfer files from Windows to Hp-UX box with out any software(Filezilla ...., Fsecure file transfer) Is it possible to transfer using command prompt ? (6 Replies)
Discussion started by: girija
6 Replies

6. Solaris

File transfer from Windows to Solaris.

I have a file on my desktop which is windows based. I make a telnet session with a Solaris machine that too with root access by using putty. I want to transfer a file there on Solaris machine. Is there a mean to transfer this file on solaris machine. If now can it be known by using telnet... (6 Replies)
Discussion started by: nixhead
6 Replies

7. Shell Programming and Scripting

Shell Script to transfer files from unix to windows

I have to transfer a file from unix to windows through Shell Script. I am using the below script, but it is not working. Please help. Please note --- I have to transfer the file from unix to windows. Not from windows to unix. I mean I don't have to use batch script.Only through unix shell script.... (1 Reply)
Discussion started by: vsachan
1 Replies

8. UNIX for Dummies Questions & Answers

transfer windows files to linix

I'm very new to linix (using puppy) and need to transfer some files on the same computer from windows to linix. Please use small easy words (2 Replies)
Discussion started by: bugzy
2 Replies

9. Solaris

Transfer files from windows to solaris with winscp (file protocol:SFTP)

Hello, I have a couple of zip files to be copied from my local drive to a folder in solaris10 residing in a VM ware. i am using WINSCP, I tried to get hold of the solaris hostname or ip using ifconfig -a , hostname|nslookup etc. when i create a new session in WINSCP using that IP and port... (6 Replies)
Discussion started by: herbich1985
6 Replies

10. Shell Programming and Scripting

Help with a script to transfer files from Solaris to windows

Hi Please can you tell me what could be wrong with the following scriptto transfer files from solaris 10 to windows machine: #!/bin/sh HOST=<IP> USER=administrator PASSWD=xyz123zyx /usr/bin/ftp -inv <<EOF connect $HOST user $USER $PASSWD cd Documents binary mput *.sh bye EOF (23 Replies)
Discussion started by: fretagi
23 Replies
ALTER 
USER(7) SQL Commands ALTER USER(7) NAME
ALTER USER - change a database user account SYNOPSIS
ALTER USER username [ [ WITH ] option [ ... ] ] where option can be: [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' | CREATEDB | NOCREATEDB | CREATEUSER | NOCREATEUSER | VALID UNTIL 'abstime' ALTER USER username SET variable { TO | = } { value | DEFAULT } ALTER USER username RESET variable DESCRIPTION
ALTER USER is used to change the attributes of a PostgreSQL user account. Attributes not mentioned in the command retain their previous settings. The first variant of this command in the synopsis changes certain global user privileges and authentication settings. (See below for details.) Only a database superuser can change privileges and password expiration with this command. Ordinary users can only change their own password. The second and the third variant change a user's session default for a specified configuration variable. Whenever the user subsequently starts a new session, the specified value becomes the session default, overriding whatever setting is present in postgresql.conf or has been received from the postmaster. Ordinary users can change their own session defaults. Superusers can change anyone's session defaults. PARAMETERS username The name of the user whose attributes are to be altered. password The new password to be used for this account. ENCRYPTED UNENCRYPTED These key words control whether the password is stored encrypted in pg_shadow. (See CREATE USER [create_user(7)] for more informa- tion about this choice.) CREATEDB NOCREATEDB These clauses define a user's ability to create databases. If CREATEDB is specified, the user being defined will be allowed to cre- ate his own databases. Using NOCREATEDB will deny a user the ability to create databases. CREATEUSER NOCREATEUSER These clauses determine whether a user will be permitted to create new users himself. This option will also make the user a supe- ruser who can override all access restrictions. abstime The date (and, optionally, the time) at which this user's password is to expire. variable value Set this user's session default for the specified configuration variable to the given value. If value is DEFAULT or, equivalently, RESET is used, the user-specific variable setting is removed and the user will inherit the system-wide default setting in new ses- sions. Use RESET ALL to clear all settings. See SET [set(7)] and the Administrator's Guide for more information about allowed variable names and values. DIAGNOSTICS
ALTER USER Message returned if the alteration was successful. ERROR: ALTER USER: user "username" does not exist Error message returned if the specified user is not known to the database. NOTES
Use CREATE USER [create_user(7)] to add new users, and DROP USER [drop_user(7)] to remove a user. ALTER USER cannot change a user's group memberships. Use ALTER GROUP [alter_group(7)] to do that. Using ALTER DATABASE [alter_database(7)], it is also possible to tie a session default to a specific database rather than a user. EXAMPLES
Change a user password: ALTER USER davide WITH PASSWORD 'hu8jmn3'; Change a user's valid until date: ALTER USER manuel VALID UNTIL 'Jan 31 2030'; Change a user's valid until date, specifying that his authorization should expire at midday on 4th May 1998 using the time zone which is one hour ahead of UTC: ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1'; Give a user the ability to create other users and new databases: ALTER USER miriam CREATEUSER CREATEDB; COMPATIBILITY
The ALTER USER statement is a PostgreSQL extension. The SQL standard leaves the definition of users to the implementation. SEE ALSO
CREATE USER [create_user(7)], DROP USER [drop_user(l)], SET [set(l)] SQL - Language Statements 2002-11-22 ALTER USER(7)
All times are GMT -4. The time now is 08:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy