LinuxQuestions.org
Help answer threads with 0 replies.
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 07-04-2005, 12:40 AM   #1
shujja
LQ Newbie
 
Registered: May 2005
Posts: 20

Rep: Reputation: 0
Permission denied for root user


Hi everybody,

When i login as a root in redhat9, and write any command such as /boot/grub/grub.conf or gedit /etc/inittab, system gives following message
-bash: permission denied.

Plz help me.
 
Old 07-04-2005, 01:18 AM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Do you mean logged in as the root user or logged in as a regular user using su in the terminal?

If the second option is the case, try using:

su -

instead of just

su
 
Old 07-04-2005, 01:59 AM   #3
jacobselvin
Member
 
Registered: May 2005
Location: Australia
Distribution: SUSE 10.1
Posts: 62

Rep: Reputation: 15
Are you sure you have permissions to write the file. Do a ls -l on files and make sure you don't have some like r--r--r--. Then you have to change the permission using the chmod command.
 
Old 07-04-2005, 02:46 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,974
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Re: Permission denied for root user

Quote:
Originally posted by shujja
Hi everybody,

When i login as a root in redhat9, and write any command such as /boot/grub/grub.conf or gedit /etc/inittab, system gives following message
-bash: permission denied.

Plz help me.
Well, for the first "command" I understand why you'd get
permission denied, /boot/grub/grub.conf is most likely not
executable, and therefore even root can't run it.


For the "gedit /etc/inittab" I'd like to see a copy & paste of the
actual screen session.


Cheers,
Tink
 
Old 07-04-2005, 05:02 AM   #5
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
Check the permissions of the files,if proper pemissions are not there set the permission as root.
 
Old 07-04-2005, 07:47 AM   #6
tinyboys
LQ Newbie
 
Registered: Jul 2005
Location: India
Posts: 2

Rep: Reputation: 0
hi,
I deleted a user after upgrading from redhat 8 to 9 and I cannot delete the Xauthority files of that user even as root from both the Xwindow and console(bash).
I got the same error access denied.
 
Old 07-05-2005, 02:11 AM   #7
shujja
LQ Newbie
 
Registered: May 2005
Posts: 20

Original Poster
Rep: Reputation: 0
Hi friends,

thanks for taking interest and providing best help.

i have used the su command as root, which is

[root@localhost root]#su
Passwordtype root password)
incorrect login (system replies)

same happen with the command su -

plz tell me the right way of logging in as su or su -

thanks
 
Old 07-05-2005, 03:29 AM   #8
hk_linux
Member
 
Registered: Nov 2004
Location: India
Distribution: RedHat, PCQLinux, Fedora
Posts: 95

Rep: Reputation: 15
Quote:
Originally posted by shujja

i have used the su command as root, which is

[root@localhost root]#su
Passwordtype root password)
incorrect login (system replies)

same happen with the command su -
If you are already in the root, why do you want to do a su to root again? Also, if you are already as the root,
when you do a su (or su - ), you will not be asked for the password.

Quote:
plz tell me the right way of logging in as su or su -
That depends on the situation. The main difference of a su and a su - is that, the .bashrc (i assume u use bash) will
be executed (or rather sourced ) when you do a su -.

HTH.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission denied as root Cadmium Mandriva 6 10-07-2005 12:00 PM
whatever a non-root user does, he gets 'permission denied'. boazg Linux - Software 2 08-05-2005 08:17 AM
root gets permission denied Nightfrost Debian 22 11-21-2004 05:19 AM
Permission denied as root Cynric Linux - General 4 08-15-2004 11:47 AM
Permission denied on " ls "for root user itsjvivek Linux - General 12 12-11-2002 07:02 PM


All times are GMT -5. The time now is 09:36 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration