Sponsored Content
Top Forums Shell Programming and Scripting Shellscript to Sudo other account Post 302147242 by sachin.tendulka on Monday 26th of November 2007 04:21:54 AM
Old 11-26-2007
blowtorch,

Thank u for the response..I am a Java/J2EE guy. Where i have been a given a shell script to write. Since i am new to this and since you are the moderator can you help me with an example shellscript to sudo other account and
read a file "ram.inc" and get only the port no. in it and store it in ram.txt file and return it. Since this is urgent to be delivered can provide me with an example atleast.
So that i can modify it according to my need.

Thanks,
Sachin
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Account creation Sudo enabled

Hi, how to create account with the following be cron enabled only accessible via sudo (1 Reply)
Discussion started by: vilves
1 Replies

2. UNIX for Dummies Questions & Answers

Setting an account to be a non-login account automatically?

Is there a way to easily change an account to be a non login account (NP in the shadow) file? I know I can just edit the file but that is not what we want to do. We use access control software and want to provide a way to set an account to be non-login using simple commands that can be mapped... (0 Replies)
Discussion started by: LordJezo
0 Replies

3. UNIX for Dummies Questions & Answers

Change Account to not lock account if password expires

I have access to 15+ UNIX boxes at work, and I do not consistently log onto all of them over time. When I do try to access one I havent been on in awhile, my account is locked as the password has expired. I need to request to the UNIX SA's that the password expiration is 90 days and that if it... (1 Reply)
Discussion started by: stringzz
1 Replies

4. Linux

Apply disk quota to account(dedicate 3 GB to account).

Hi , I am faceing lot of problem due to "disk space is not enough". senerio is like as, In system has 5 account. a,b,c,d,e say account c if very critical. Due to other user's data, user 'c' is faceing disk space issue. I want to dedicate 3 GB for user 'c'. No user... (1 Reply)
Discussion started by: ashokd009
1 Replies

5. Shell Programming and Scripting

Issue in passing passwd to login into a sudo account

Hi Gurus, I have small issue... I used to pass the passwd for sudo commands like below, gzcat ~/passwd.gz | sudo su - <villin> >> eof ------ ----- ------ eof And it was able to login into "villin" sudo account successfully. But now, I'm using the same in another script for the... (2 Replies)
Discussion started by: raghu.iv85
2 Replies

6. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

7. Shell Programming and Scripting

Shellscript not executing further after sudo over a user

Hi, I am writing a switch case statement and one of the option contains sudo to a particular user and then perform some steps after that but my script is unable to proceed with further execution after doing sudo over the user. Could you please suggest an workaround for this. (1 Reply)
Discussion started by: adityam
1 Replies

8. How to Post in the The UNIX and Linux Forums

Simultaneously try to execute commands after connecting to remote account to one account

I have made password less connection to my remote account. and i tried to execute commands at a time. but i am unable to execute the commands. ssh $ACCOUNT_DETAILS@$HOST_DETAILS cd ~/JEE/*/logs/ (1 Reply)
Discussion started by: kishored005
1 Replies

9. Windows & DOS: Issues & Discussions

What happens to your skype account if you close outlook.com email account?

Hello, Does anyone know what happens to your skype account if you close the outlook.com email account which are linked together? As you know they are both owned by Microsoft. Thanks (0 Replies)
Discussion started by: milhan
0 Replies
deploytool(1m)						    Application Server Utility						    deploytool(1m)

NAME
deploytool - launches the deploytool utility to deploy, package, and edit your J2EE applications SYNOPSIS
deploytool [--help] [--userdir user_directory] [--configdir configuration_directory] Use the deploytool utility to deploy and package your J2EE applications and components, create and edit J2EE deployment descriptors, and create and edit J2EE Application Server specific deployment descriptors. If the application is not J2EE compliant, an error message is dis- played. Only one session of the deploytool utility can run with a specific user directory. A lock file is created to ensure that only one utility session is running. A message is displayed if a lock file is detected. OPTIONS
--help displays the arguments for launching the AssemblyTool. --userdir identifies the user directory. The default user directory is .deploytool under your home directory. Only one deploytool session can be running per user directory. A lock file is created under the user directory to ensure that only one session of the deploytool is running. The deploytool utility uses this directory to store configura- tion information. o On Solaris, the default directory is at ~/.deploytool --configdir identifies the configuration directory. The configuration directory is where the asenv.conf file is located. On Solaris the asenv.conf can be found at: o Bundled installation: /etc/appserver o Unbundled installation: default is /etc/opt/SUNWappserver7 or user specified o Evaluation installation: AS_SERVER_INSTALL/config. Where AS_SERVER_INSTALL is the directory where you have installed the Java 2 Platform, Enterprise Edition 1.4 Application Server Beta 2. EXAMPLES
Example 1: Using deploytool example% deploytool --userdir /myapplication --config_dir /myconfigdir Where --userdir specifies the destination directory, and -config_dir identifies the configuration directory. SEE ALSO
verifier(1M) Sun Java System Application Server March 2004 deploytool(1m)
All times are GMT -4. The time now is 08:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy