![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trouble with awk | RichieFondel | Shell Programming and Scripting | 1 | 01-17-2008 07:30 AM |
| X trouble | izua | UNIX for Dummies Questions & Answers | 0 | 01-03-2007 06:19 PM |
| Trouble with tr | Mike@Work | SUN Solaris | 8 | 08-10-2006 03:04 PM |
| The trouble with... | zazzybob | What's on Your Mind? | 6 | 01-18-2005 06:01 AM |
| trouble | awk | UNIX Desktop for Dummies Questions & Answers | 1 | 11-22-2002 10:51 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi all,
having read lots of posts about SU I don't quiet understand this : I'm doing regular backups of my database (u betta do) and therefore use su - username -c "sqlscript special data_base" in a unixscript which is even using cron. (yep!) Now I need some other script, still with this database, to do some updates to it, nightly. Manually, I can run the usual command (being root) as above but the problem is that I can't get out of it unless keying exit in. Even keying exit between the quotes doesn't work. When keying exit in at commandline, I get back to my root-shell and the script is launched correctly. Any idea would be greatfully accepted! |
|
||||
|
Ok, there you go :
As root. su - dbuser -c "customers.exe upd_prclst" or su - dbuser -c "customers.exe upd_prclst;exit" is putting me into a new shell as user dbuser. This user then has full access to all of his environment but the prog customers.exe upd_prclst is not ran. I then key in an exit command which puts me back to the root environment. The prog is executed ok in the dbuser shell. I suppose there must be a CTRL-D or something missing but ![]() |
|
||||
|
Ahhhaahh !!!
You are right! Why this has been done this way ... dunno but in fact, the .profile is executing another script which is executing ksh -o vi at the end of it. I don't know yet wheather this is important or not but I made a copy of the user and deleted the ksh command. It works ok now. Great! Thanks a lot! ![]() |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|