Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems using SU.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
snerkel
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2004
Posts: 80
Location: uk

PostPosted: Sat May 21, 2005 1:31 am    Post subject: Problems using SU. Reply with quote

Hi. I have been having troubles. For some reason when i run su from Xterm in kde it asks for root password but it will not accept it. I had no problems with that before. I cant figure out whats wrong, even when i try to do something like use sudo to get root access to an application it wont accept root password. I know that the root password im using is correct because i can login locally through command but i cant login to kde as root because obviously it wont let me. Also my user is in the wheel group so no problems there.

Does anyone know why it might be doing this?

Thanks in advance,
Regards Ben.
Back to top
View user's profile Send private message
tawtao
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2003
Posts: 116
Location: Baltimore

PostPosted: Sat May 21, 2005 3:43 am    Post subject: Reply with quote

check permission. It should have set user id or group ID on execution (s).
Back to top
View user's profile Send private message
snerkel
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2004
Posts: 80
Location: uk

PostPosted: Sat May 21, 2005 10:49 am    Post subject: Reply with quote

OK. I read your post and i checked the permissions for /bin/ which is where su is located and every file in /bin/ is owned by 1000:441. Is this normal?

Thanks again
Back to top
View user's profile Send private message
alveraan
n00b
n00b


Joined: 24 Oct 2004
Posts: 59
Location: Belgium

PostPosted: Sat May 21, 2005 1:08 pm    Post subject: Reply with quote

Hi Ben,

I think there should be root:root for all files when you do a ls -l of /bin.
What happens when you do a chown root:root /bin/su and retry?
_________________
Everytime you kill a kitten, god masturbates.
Back to top
View user's profile Send private message
tawtao
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2003
Posts: 116
Location: Baltimore

PostPosted: Sat May 21, 2005 1:19 pm    Post subject: Reply with quote

snerkel wrote:
OK. I read your post and i checked the permissions for /bin/ which is where su is located and every file in /bin/ is owned by 1000:441. Is this normal?

Thanks again


Certainly not. Those files in /bin should be owned my root:root. This is the reason that su does not work. What you have to do is that login as root, chown of those files to root:root, and make sure that the permission of su is "-rws--x--x".

Since sudo is in /usr/bin, I suggest that you should check the owner and permission of other systems files, such as /usr/sbin, /usr/bin, and specially /var. It should not be 1000:441, because 1000 is the first ID of normal user. I bet, those files must be moved to some where else and moved back. What kind of backup system are you using?
Back to top
View user's profile Send private message
snerkel
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2004
Posts: 80
Location: uk

PostPosted: Sat May 21, 2005 2:57 pm    Post subject: Reply with quote

At the moment im not using any backup system :\. Shall i just run
Code:
chown root:root /bin/*
chown root:root /bin/*/*
etc.

then
chown root:root /usr/bin/*
chown root:root /usr/bin/*/*
etc.

chown root:root /usr/sbin/*
chown root:root /usr/sbin/*/*
etc.

then
chown root:root /var/*
chown root:root /var/*/*
chown root:root /var/*/*/*
etc.


Actually should i do that for /var because some things need to be owned by apache for example?

Thanks for the help.

edit: the permissions for sudo are:
Code:
ben@myroom ~ $ ls -l /usr/bin/sudo
---s--x--x  1 root root 88100 May 10 02:14 /usr/bin/sudo


Should the permissions be the same as su?
Back to top
View user's profile Send private message
tawtao
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2003
Posts: 116
Location: Baltimore

PostPosted: Sat May 21, 2005 3:06 pm    Post subject: Reply with quote

You can just simply use -R option, such as

chown -R root:root /usr/bin

And you right about /var. Some has to be own by apache, mysql ... So it is important to check owner of the /var before you do chown command. If you don't have to, don't do it. However, if it is already be 1000:441, you have no choice but to change them to root:root, and then you have to find out which directories/files need to be owned by other user beside root. You better have the second working gentoo around, so that you can compare.
Back to top
View user's profile Send private message
snerkel
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2004
Posts: 80
Location: uk

PostPosted: Sat May 21, 2005 4:46 pm    Post subject: Reply with quote

does the "-R" option meen that it will change every file in the directory ?

Thats a good point i can check it against my gentoo server :)
Back to top
View user's profile Send private message
tawtao
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2003
Posts: 116
Location: Baltimore

PostPosted: Sat May 21, 2005 10:23 pm    Post subject: Reply with quote

-R means recursive to subdirectory. So every fiiles and every subdirectories will be changed. Grad to hear that you have another machine to compare with. Have fun. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum