LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-11-2007, 07:58 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
'su' user without password


Dear friends ,

I want to "su - root" or "su - 'to another user'" without password .

Because i need to execute the following script :

/bin/su bschorun - c "/opt/bea/tuxedo9.1/bin/tmboot -y


But in this case it wants user password . But i need to execute it without password .


Plz help me, how can I do it ?
 
Old 11-11-2007, 08:07 AM   #2
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
root#
root#sudo su anotheruser
anothheruser#

or as some other user
anotheruser#sudo /bin/su bschorun - c "/opt/bea/tuxedo9.1/bin/tmboot -y

Last edited by knockout_artist; 11-11-2007 at 08:09 AM.
 
Old 11-11-2007, 08:19 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Using su to become root without a password is the same as allowing root to log in without a password. It creates a big security risk.

But, for a script, I'm not sure why this is necessary. You can just run the script as root, or you can have the system run it as part of boot up or under cron.

As I read the command (not a script), you want to su to the user "bschorun", and then run the command "tmboot -y". You can su to become any user if you are root--or have root priveleges. But you can't su to another user from your login--unless you have the user's permission.

Perhaps you can describe more about what you are trying to do.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'su' password? johnnyduran Linux - Desktop 4 11-28-2006 12:48 AM
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 10:55 AM
where does 'su' look to determine if a user exists? MisterESauce Linux - Software 5 04-13-2005 09:18 AM
'su' problems for single user charmsrunner Linux - Software 4 12-17-2004 11:20 PM
How to know if there any other user try to 'su' but with invalid password? huangyanfeng Linux - General 3 11-05-2003 10:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration