12-16-2012
Pls post the output of the SQL query alone, i.e. what will go into the user variable.
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all, working on script to create a user acct on all our servers.
for i in `cat $host_file`; do
ssh $i /usr/bin/sudo /usr/bin/mkuser id='bpadm' gecos='NetBackup Admin' 2>&1 >> $log
done
error i get is: 3004-692 Error changing "id" to "bpadm" : Value is invalid.
I have tried this in... (1 Reply)
Discussion started by: dnidiffer
1 Replies
2. OS X (Apple)
Hello everyone,
Not sure if this is the right place, but OS X isn't your standard Unix, so I figured here would be best. I am looking at creating a script that will be interactive that admins can run to create users.
Now, 10.4 uses netinfo database and netinfo manager to handle it's users. ... (3 Replies)
Discussion started by: tlarkin
3 Replies
3. Shell Programming and Scripting
I am coding shell script.
I need to connect to different databases like DB2, Oracle and Sybase.
I would then need to query tables where it has all the groups, users for that database.
I would also need who has what kind of permissions.
EG: I know for DB2 some TABAUTH table needs to be... (0 Replies)
Discussion started by: pinnacle
0 Replies
4. Shell Programming and Scripting
Hi, i have the following:
db="create database xxx;GRANT ALL PRIVILEGES ON xxx.* TO user@localhost IDENTIFIED BY 'password';FLUSH PRIVILEGES;quit;"
mysql -u root -p$mysql_pass -e "$db"
I don't understand why this is failing, it works fine when run from cmd but when is run in a bash script,... (1 Reply)
Discussion started by: ktm
1 Replies
5. Shell Programming and Scripting
I remote to many DMZ boxes every day to run batch file that allows me to create users. I create users in 17 DMZ boxes every day which takes a lot of my time.
Is there any script that would do this job from my local computer?
Thank you for your help! (3 Replies)
Discussion started by: idiazza
3 Replies
6. Shell Programming and Scripting
I need to run a SQL select query in Oracle database and have to capture the list of retrieved records in shell script. Also i would like to modify the query for certain condition and need to fetch it again. How can i do this?
Is there a way to have a persistent connection to oracle database... (9 Replies)
Discussion started by: vel4ever
9 Replies
7. Shell Programming and Scripting
I've been sent the following script to finish. It's supposed to connect to an oracle database, query it, and send an email if the query result value is one or more. Currently it isn't connecting properly, just giving the following error:
ERROR: ORA-01017: invalid username/password; logon denied... (2 Replies)
Discussion started by: jackmorgan2007
2 Replies
8. Programming
Hi.
I have two text files(tables) which include some information and I want to make some query codes using them.
First of all, I want to create bash script that read this two tables, create/open database and insert data from files into database.
#!/bin/bash
while read line; do
... (1 Reply)
Discussion started by: rlaxodus
1 Replies
9. UNIX and Linux Applications
Hello ,
I am new in this forum and need your help as I am totally confused :confused:
I read a lot of threads and tried to search a lot but did not get the exact answer to my question.
I just want a simple (content wise may be long) shell script to create oracle database.
In detail:... (5 Replies)
Discussion started by: rahoolm
5 Replies
10. Shell Programming and Scripting
Hi All,
I am new to scripting, i want to create one script in which i can add users from a text file, assign them a default password like 123456.
It should be like:
Username= $i (it should take users from text file one by one)
Password : 123456(default for every user) (1 Reply)
Discussion started by: prad_rocxx
1 Replies
LEARN ABOUT SUNOS
imqusermgr
imqusermgr(1M) System Administration Commands imqusermgr(1M)
NAME
imqusermgr - command utility for managing a Message Queue user repository
SYNOPSIS
/usr/bin/imqusermgr subcommand [[option]...]
/usr/bin/imqusermgr -h
/usr/bin/imqusermgr -v
DESCRIPTION
The imqusermgr utility manages a file-based user repository to authenticate and authorize users of a Message Queue message server.
imqusermgr provides subcommands for adding, deleting, updating, and listing user entries in the repository.
imqusermgr supports four management subcommands. These subcommands, and their corresponding options follow the imqusermgr command on the
command line. See USAGE and OPTIONS.
The following subcommands are supported:
add
Add a new user and associated password to the repository.
delete
Delete a user from the repository.
list
Display information users in the repository.
update
Update the password or state of a user in the repository.
OPTIONS
The following options are supported:
-a active_state Specify if user's state is active or inactive. An inactive user cannot create connections to the Message Queue message
server.
Valid values for active_state are true or false. Specify true for active or false for inactive. the default is true.
Use this option with the update subcommmand.
-f Perform action without user confirmation.
Use this option with the delete and update subcommmands.
-g group Specify the group of the user.
Valid values for group are admin, user, and anonymous.
Use this option with the add subcommmand.
-h Display usage help. Exceute nothing else on the command line.
-i brokerName Specify the broker instance user repository to which the command applied. If you do not specify brokerName, the default
brokerName is assumed.
Use this option with the add, delete, list, and update subcommmands.
-p password Specify user password.
Use this option with the add and update subcommmands.
-s Silent mode. Display no output
Use this option with the add, delete, and update subcommands.
-u userName Specify user name.
userName cannot contain the following characters: asterisk (*), colon (:), <NEWLINE>, or <RETURN>.
Use this option with the add, delete, update and list subcommands.
-v Display version information. Exceute nothing else on the command line.
USAGE
The following subcommands and corresponding options are supported:
add -u userName -p password [-g group] [-s] [-i brokerName]
Add a new user and associated password to the repository, and optionally specify the user's group.
delete -u userName [-s] [-f] [-i brokerName]
Delete a user from the repository.
list [-u user_name] [-i brokerName]
Display information about the specified user in the repository. If no user is specified, all users are displayed.
update -u userName -p password [-a state] [-s] [-f] [-i brokerName]
update -u userName -a state [-p password] [-s] [-f] [-i brokerName]
Update the password or state (or both) of a user.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of this command:
IMQ_JAVAHOME Specify the Java 2 compatible runtime. When this environment variable is not set, it defaults to /usr/j2se.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/etc/imq/passwd Flat-file user repository.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWiqu |
+-----------------------------+-----------------------------+
SEE ALSO
imqadmin(1M), imqbrokerd(1M), imqcmd(1M), imqdbmgr(1M), imqkeytool(1M), imqobjmgr(1M), attributes(5)
Sun Java System Message Queue Administrator's Guide
SunOS 5.10 23 Mar 2004 imqusermgr(1M)