Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Informix > change unix password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-07-03, 14:05
prasadpati prasadpati is offline
Registered User
 
Join Date: Apr 2003
Posts: 3
change unix password

How can we change unix password from informix through code.
__________________
pat
Reply With Quote
  #2 (permalink)  
Old 04-08-03, 06:26
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
You can use the system command in stored procedures to execute unix commands.
__________________
rws
Reply With Quote
  #3 (permalink)  
Old 04-08-03, 13:50
prasadpati prasadpati is offline
Registered User
 
Join Date: Apr 2003
Posts: 3
Thanks

I tried
system "passwd";

getting error,
system command cannot execute
not a owner

If i run passwd in shell it works.
__________________
pat
Reply With Quote
  #4 (permalink)  
Old 04-08-03, 14:17
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
Here 's the conclusion of an article on the 'system' call:

The stored procedure system calls are made as the login user who initiates
the session. The SHELL for the system call is user login shell, and the
environment (including SHELL) is obtained from the oninit. A number of
variables, like CLIENT_LOCALE, are in this environment even if they are not
in the users login environment. Sgidsh is not used by online. The errors
reported in addition to the 668 error do not reflect the OS, ISAM, or SQL error.


How does a user or support engineer resolve these issues? The short answer
is that it can be very difficult. Here is the long answer:


(1) Run the failed command at the command line as the login user and from
the informix initialization shell,
(2) Try running the procedure as other users.
(3) Get environments from unix command line "env" calls and from system
calls to env.
(4) Look at directory permissions and ownership and all the other
obvious issues that can prevent execution (see Things to Check
in the APPENDIX).
(5) Have the user and other users create and run a simple procedure.
(6) Re-install the engine.
(7) Attach a debugger to the ADMVP UNIX process and examine the output.
Pay close attention for the appearance of these errors:

vp_exit( 0x81 ); /* file descriptor points to wrong file
vp_exit( 0x82 ); /* setgid fails
vp_exit( 0x83 ); /* setgroups fails
vp_exit( 0x84 ); /* setuid fails
vp_exit( 0x85 ); /* chdir fails
vp_exit( 0x86 ); /* execve fails
vp_exit( 0x87 ); /* fork process failed

If they are observed, take a close look from where they are called and
the user that calls them. A problem here could just reflect an issue with
the permissions on the oninit. Expected file permissions and ownership
are
found in a file named *files (e.g. IIFfiles) in INFORMIXDIR/etc



If you want the whole article, I can send it too.
__________________
rws
Reply With Quote
  #5 (permalink)  
Old 04-09-03, 06:05
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
Here it is.
Attached Files
File Type: txt system.txt (20.8 KB, 86 views)
__________________
rws
Reply With Quote
  #6 (permalink)  
Old 04-09-03, 22:28
prasadpati prasadpati is offline
Registered User
 
Join Date: Apr 2003
Posts: 3
Thanks for your info.
__________________
pat
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On