any way to use SU command without prompt for password


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting any way to use SU command without prompt for password
# 1  
Old 11-16-2003
any way to use SU command without prompt for password

Hi,
First i want to tell you i am not a administrator and everytime to run a sqlscritpt i have to login as SU in a particular account to connect to sqlplus..

I want to write a script which can make me free by doin this .. since i am having the permission for SU i want to know if i can SUDO into that particular account without getting a prompt for entering password ... Is there a way i can provide password to SU so that it doesn't give me password prompt..

Thanks for any help you can provide me in this ....
# 2  
Old 11-16-2003
take a look and see if you have the 'sudo' program installed on your system. sudo can do this and its configuration is controlled by the /etc/sudoers file. it is easy to set up.
# 3  
Old 11-17-2003
You should always identify which platform you are working with. There are often facilities that are particular to the OS that may accomplish a desired task. For example, Solaris has the RBAC facility that can authorize a user to execute a program with an effective uid.

I'd be extremely cautious in what you are describing. You don't want to sacrifice security for ease of use. There are other options such as setuid with extended ACLs (setfacl) or if it is a job that will run as a scheduled job, running it out of root's cron.

Cheers,

Keith
# 4  
Old 11-17-2003
Hi guys ,

Thanks for the reply and sorry for not letting you the flavour of UNIX i am working on ..

I am on SUN solaris 5.7 ....

I do have the sudo installed but don't have access to view the /etc/sudoers file .

My point is if i am authorize to do a particular thing then i should be able to do it within my login ... Looking for a way to do it ...

I will take care of the security issue ....
See if u can help me out
c ya
# 5  
Old 11-17-2003
Sun Solaris makes it easy. It has a built in called RBAC (Role Based Access Controls). Do a man on user_attr, exec_attr and prof_attr. I'll drop a FAQ in a day or so for RBAC without the SMC.

Cheers,
Keith
# 6  
Old 11-17-2003
Hi Keith,

Thanks for letting me know about RBAC.But sadly i don't seem to have any man entry for either of these : user_attr, exec_attr and prof_attr.

Don't really know what exactly these are .. Would be great if you could tell me abt these attributes in detail ..

Really appreciate your help

Take care
# 7  
Old 11-17-2003
RBAC is a sadly under used facility in Solaris. The nice thing about RBAC is that if you are using auditing to meet C2 compliance, the audit trail is maintained, whereas such tools as sudo don't address BSM options in Solaris and break the audit trail. I don't have 5.7 running anywhere (just 8/9), so I'd take a close look at the file formats before following my example.

Oops - there's the call for dinner. I'll post the example tonight. Typically you administer RBAC from the SMC, but I don't like it and tend to leave it off and edit the files directly. You can grab some blueprints from sun.com/bigadmin.

Cheers,

Keith
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Sudo command prompt for a password

in the /etc/sudoer file this line was added: wtolentino ALL=(ORACLE) NOPASSWD: /bin/chmod when i tried to run this command sudo -u oracle /bin/chmod 775 /appshared/applications/lpa/executables/chrpt001.rep it prompts me for a password for example: $ pwd /appshared/applications/lpa... (2 Replies)
Discussion started by: wtolentino
2 Replies

2. Linux

How to make this command work wihtout password prompt?

Hi, I am trying to run this command to connect to each server without being prompted for the password. How can I do this in Linux redhat 7.2: for HOST in $VIPS; do su - Myadminid -c "ssh -o ConnectTimeout=10 $HOST 'date; hostname; pkill -9 -f -u Myadminid xx00 ; ps -ef |grep Myadminid'" ... (7 Replies)
Discussion started by: mrn6430
7 Replies

3. Solaris

Not getting command prompt after entering the login password

Hi All, I am not able to get the command prompt after entering the login password on solaris server Only access is through console. Server type : sun4u sparc SUNW,Netra-T12 bsnl-north-in > ssh 10.147.17.207 jtoin Connecting to 10.147.17.207 as user jtoin Password: Last login: Wed Mar 5... (1 Reply)
Discussion started by: sandeep_kmehra
1 Replies

4. UNIX for Advanced & Expert Users

Changing the password prompt

Is there any way I can change the prompt which asks for the password on a UNIX system? e.g. When I login using Telnet instead of "Password" I should get "Correct Password". Thanks, Vineet (3 Replies)
Discussion started by: vineetd
3 Replies

5. Shell Programming and Scripting

rsync without password prompt

Hi, I am tranfering the files from local machine to remote machine using rsync utility but it is prompting password. but i don't want to provide through prompt. how can i give in my shell script. can anyone suggest me.Thanks in advance rsync -rvcpogtl -e "ssh $LOCAL_PORT" $SOURCE_DIR... (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

6. UNIX for Advanced & Expert Users

su command without password prompt to non-root account

Hello. I searched the internet for answers and don't seem to find any for about a day now. My problem. I want to su to a non-root account non-interactively, e.g. if I want to temporarily become prdusr, I want to su prdusr without keying prdusr's password every time. What I want is... (10 Replies)
Discussion started by: royale-sojin
10 Replies

7. UNIX for Advanced & Expert Users

Stopping password prompt

hi I have installed a new Linux machine and having another machine having Solaris on it. i want that when i log into my solaris machine using rlogin from Linux machine then no password prompt occurs... Thanks in advance. (4 Replies)
Discussion started by: rochitsharma
4 Replies

8. IP Networking

Unable to get password prompt

Hi I am using a Solaris 2.5.1 and i am unable to logon on the console. When i key in say, root on the login prompt, it does not prompt me for password but instead return to the login prompt again. Please help. thanks (2 Replies)
Discussion started by: owls
2 Replies

9. UNIX for Dummies Questions & Answers

rcp without password prompt

Hi, i have a request about rcp. is it possible to to make a rcp sessions for a normal user witch should have this option without a password prompt. what are the important steps .... add the host and user i the .rhosts and and . . . . many thx (1 Reply)
Discussion started by: scottl
1 Replies
Login or Register to Ask a Question