Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-11-2007, 08:58 AM   #1
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, 09:07 AM   #2
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
root#sudo su anotheruser

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 09:09 AM.
Old 11-11-2007, 09:19 AM   #3
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:48 AM
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 11:55 AM
where does 'su' look to determine if a user exists? MisterESauce Linux - Software 5 04-13-2005 10:18 AM
'su' problems for single user charmsrunner Linux - Software 4 12-18-2004 12:20 AM
How to know if there any other user try to 'su' but with invalid password? huangyanfeng Linux - General 3 11-05-2003 11:05 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:12 AM.

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