LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   no root access and other annoyances (https://www.linuxquestions.org/questions/linux-newbie-8/no-root-access-and-other-annoyances-159101/)

chumley115 03-17-2004 04:04 PM

no root access and other annoyances
 
Hi ,
1. Main issue: I am in a real newbiefix. I tried to change my permissions of all my files since I am the only one that uses this computer. I am running dual boot XP and Mandrake 9.2. Mandrake 9.2 was running well until I decided to play around (that's what it's for in my opinion), well I tried to change the permission to a file can't remember what and it said access denied you don't have enough permissions or something like that and so I tried to su into root and it didn't work for some reason. So, silly me, I tried to chmod -R 777 / to change all of my file permissions so I have access to them. Well that did not work and I forget what message I got but then I went to su again and this time I got the following:"su: warning: cannot set groups: operation not permitted". So then I tried su - and I got the following message: "su: warning: cannot change directory to /root: permission denied. and su: cannot set groups: operation not permitted" I can get into root using single user at login, but then I am at a terminal and I still don't know how to correct the above problem from there.

2. I use KDE 3.1 and the task bar that brings up the menu on the left of the screen does not work now. I click on it and something behind the taskbar peeks over the top, but nothing happens.

3. In Mozilla 1.6, I have set it up so that a wav file I like is supposed to notify me that new email has arrived, but all I get it the default bing. I know the wav file works cuz I tried it in XMMS.

4. I have a bunch of images loaded into KDE for wallpaper and sometimes they are just beautiful and other times they are really unrecognizable (great big pixels)

5. I KNOW there are ways to fix all of the above, but I don't know what they are. I thought I had screwed things up so bad that I should load Mandrake 10.0 and it took me FOREVER to get the isos recorded and they won't either. I can't seem to get past the LILO boot loader. I have changed my BIOS to begin with CDROM, but it bounces to the lilo menu and I have to load XP or Linux.

6. Thanks for listening and helping this poor schlub. I had to get my wife her own computer cuz I was always messing the one we had up. Now she's happy and I am still messing things up.:confused:

liamoboyle 03-17-2004 06:05 PM

Log in in single user mode, and check the permissions on /root

'ls -la /root' will show you ownership andpermissions on the root directory (shown as .) and all permissions on it. The first few lines should be something like this -


liam@loki:~$ ls -la /root/
total 2.2M
drwxr-xr-x 16 root root 1.0K 2004-03-18 10:52 ./
drwxr-xr-x 21 root root 1.0K 2004-03-18 12:26 ../

to make sure, you should run these commands

cd /
chown -R root:root /root
chmod iR U+X /root
chmod -R u+rwX /root

This will make sure that everything in /root is a) owned by root, b) is readable and writable by root and c) all directories have execute permissions for root.

After that, you should be able to log in again.

I also recommend using letters with chmod (like chmod uga+rwx instead of chmod 777) while you're learning, it's a little easier to understand.

chumley115 03-17-2004 10:33 PM

Thanks very much. I'll give it a try.
:newbie: :p

chumley115 03-17-2004 10:48 PM

Just gave it a try and I got an "invalid mode string" for the iR when I typed
chmod iR U+X /root. The other two: chown -R root:root /root and chmod -R u+rwX /root
appear to have worked as I got no error messages.

I dropped out of root with exit and the 9.2 started and I went to a terminal and there
I was chumley: $ I typed su and password and I got the same error message:
"su: cannot set groups: Operation not permitted."

Did I type something wrong?
:confused:

chumley115 03-17-2004 11:44 PM

Just checked a file in the my chumley directory called .xsession-errors and this is
what it has in it, but I don't know what it means.

cpp: installation problem, cannot exec `cc1': No such file or directory
startkde: Starting up...
kbuildsycoca running...
kio (KService*): WARNING: The service/mime type config file
image/x-webshots.desktop
does not contain a ServiceType=...
or MimeType=... entry
mcop warning: user defined signal handler found for SIG_PIPE, overriding
mcop warning: user defined signal handler found for SIG_PIPE, overriding
WARNING: Kicker: Error loading background theme pixmap
WARNING: Kicker: Error loading background theme pixmap
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
konsole: cannot chown /dev/pts/0.
Reason: Operation not permitted
konsole: chownpty failed for device /dev/pts/0::/dev/pts/0.
: This means the session can be eavesdroped.
: Make sure konsole_grantpty is installed in
: /usr/bin/ and setuid root.
konsole: cannot chown /dev/pts/0.
Reason: Operation not permitted
konsole: chownpty failed for device /dev/pts/0::/dev/pts/0.
: This means the session can be eavesdroped.
: Make sure konsole_grantpty is installed in
: /usr/bin/ and setuid root.
konsole: cannot chown /dev/pts/0.
Reason: Operation not permitted
konsole: chownpty failed for device /dev/pts/0::/dev/pts/0.
: This means the session can be eavesdroped.
: Make sure konsole_grantpty is installed in
: /usr/bin/ and setuid root.
konsole: cannot chown /dev/pts/0.
Reason: Operation not permitted
konsole: chownpty failed for device /dev/pts/0::/dev/pts/0.
: This means the session can be eavesdroped.
: Make sure konsole_grantpty is installed in
: /usr/bin/ and setuid root.

Demonbane 03-18-2004 01:30 AM

Code:

chmod -R 777 /
this is a very bad idea..the problem you're having is that /bin/su needs to be setuid root
you can set it by doing
Code:

chmod 4755 /bin/su
in single user mode

I recommend that you find a way to set the permissions back the way they were(maybe get someone with a similar setup to generate a list), or just do a reinstall.

Marc A 03-18-2004 08:08 AM

Hi,

liamoboyle gave you the lines and i think there is a mispelling in the fourth one
cd /
chown -R root:root /root
chmod iR U+X /root
chmod -R u+rwX /root
I've re-read man chmod and chmod --help I don't find no i letter for anithing
So I think it should read #chmod -R U+X /root and make the solution.

Hopes this works, Marc A

chumley115 03-18-2004 10:37 AM

Demonbane: Thank you. It worked. I now have su access. Now on to other problems.
Liamoboyle:
I tried the chmod -R U+X /root and it gave me an invalid parameter U+X so I tried u+x and
same result. Oh well, at least I have su access now.
Now if anyone knows where I can straighten out those other annoyances, I sure would
apprecicate it.
Thanks again guys.
Funny thing about the resolution of my wallpaper. Last night I was playing LBreakout 2 and the resolution of the wallpaper was really bad as to be unrecognizable and then after awhile (having done nothing except play the game) the wallpaper cleared up and the pictures were clear as a bell. Weird.

liamoboyle 03-18-2004 03:39 PM

Apologies, my bad typing :-/

it should be u+X

which says, give the user who owns it execute permissions on the directories.

liamoboyle 03-18-2004 03:40 PM

And more bad typing, thanks Marc A. it was meant to be -R. If only the forums would pop up errors on bad syntax ;)

chumley115 03-18-2004 09:37 PM

Thanks again guys. It worked after I changed the command to chmod -R u+X /root

Any ideas about my other questions or should I only post one question at a time?

tigeir 12-12-2005 01:20 PM

2006 Edition
 
Thank you all.

I ran into the same problem in 2006. I followed the suiggestions above and have rescued my installation. I had been reckless with my permissions in my dual boot of Suse so that I could gain easy access to my Mandriva Home folders - I learnt my lesson.

Now I just need to figure out how to resurrect Suse after installing the new kernel...it wouldn't do to have two useable OSes at once would it?

Rob

LasseW 12-12-2005 02:31 PM

This message in .xsession-errors is pretty clear:

: Make sure konsole_grantpty is installed in
: /usr/bin/ and setuid root.

Check if this has any effect:

chmod 4755 /bin/su/konsole_grantpty

jrdioko 12-12-2005 02:58 PM

Changing it so everything on your system can be run by anyone has got to have major security implications, though. It almost seems like the best thing to do (if there's no way to reset them all back) would be to set everything on your system as owned by/in the group of root and then unlock things one at a time rather than the other way around. Just my two cents...

liamoboyle 12-12-2005 09:24 PM

Multiple kernels
 
Quote:

Originally Posted by tigeir
Now I just need to figure out how to resurrect Suse after installing the new kernel...it wouldn't do to have two useable OSes at once would it?

I would suggest two things here
- it's simple to have several kernels installed, so that if a new one fails you can boot to the old one and fix the problems. What procedure are you using to install your new kernel? What boot manager are you using?
- have a bootable cd (such as Knoppix) nearby for fixing things, so convenient if things do really die hard.


All times are GMT -5. The time now is 05:16 AM.