LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-21-2011, 01:09 AM   #1
mswamy78
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Rep: Reputation: Disabled
su: No such file or directory


Hello,
If I type su, it gives me following error
su: No such file or directory

Please suggest
Thanks
Swamy
 
Old 07-21-2011, 01:37 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296
Hello,

It would be helpful if you could mention what distribution and version you are using. Check if you have the file in your /bin directory and how the permissions are set, also check your path:
Code:
ls -l /bin |grep ^su
echo $PATH
Kind regards,

Eric
 
Old 07-21-2011, 01:47 AM   #3
mswamy78
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
$ echo $PATH
/proc/boot:/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/qde/eclipse/jre/bin


$ ls -l /bin/su
-rwsrwxr-x 1 root root 14036 Jan 18 2003 /bin/su
 
Old 07-21-2011, 01:54 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296
Hi,

Not sure about this but I checked against three different systems and got this as result:
Code:
-rwsr-xr-x 1 root    root      28336 Jan 21  2009 su
Check if you can access with sudo:
Code:
sudo su -
If sudo works you could reset the permissions with:
Code:
sudo chmod g-w /bin/su
and try again.

Kind regards,

Eric
 
Old 07-21-2011, 02:09 AM   #5
mswamy78
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
I tried...

$ sudo su -
sh: sudo: not found

$ su -
su error: Shadow file does not exist

$ su chmod g-w /bin/su
su error: Shadow file does not exist
$
 
Old 07-21-2011, 02:34 AM   #6
littlejoe5
Member
 
Registered: Aug 2006
Location: Arizona
Distribution: ubuntu dirivatives mostly Mate
Posts: 258

Rep: Reputation: 19
not a common problem, but you might find some help here:

http://ubuntuforums.org/archive/inde...t-1052728.html
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot:cannot change root directory to: No such file directory janakiramulu Linux From Scratch 5 04-23-2011 01:00 AM
Get first file of directory then copy to other directory andd rename the file Faye Linux - Software 4 01-30-2011 09:16 AM
Copying a single file into each directory of a directory tree mlapl1 Linux - Newbie 2 06-27-2007 10:18 PM
How to untar a file in another directory other then current directory. dr_zayus69 Linux - Software 8 05-16-2007 11:01 AM
How to protect a file/directory in your home login directory (RH Linux) jitsenho Linux - Security 9 07-03-2006 11:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:53 AM.

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