LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-27-2010, 08:43 PM   #1
siawash
Member
 
Registered: Jun 2004
Location: Ireland
Distribution: Zorin 6
Posts: 589

Rep: Reputation: 32
user accounts


Hi, I am noticing when I try to use sudo or even log in as root I am getting the following;

Code:
siawacsh@debian:~$ sudo fdisk -l
sudo: must be setuid root
siawacsh@debian:~$ su
Password: 
setgid: Operation not permitted
Can anyone tell whats going on?
 
Old 01-27-2010, 09:13 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
You have (or something has) blown away the permissions on (at least) sudo and su. Both must be setuid root, with permissions -rwsr-xr-x or 4755 in octal. You'll have to boot from a LiveCD and change the permissions, if you don't have a root terminal up already.
 
Old 01-27-2010, 10:03 PM   #3
siawash
Member
 
Registered: Jun 2004
Location: Ireland
Distribution: Zorin 6
Posts: 589

Original Poster
Rep: Reputation: 32
Yes, I forgot to mention I was studying and messing around with a LPI tutorial on chgrp, chown, umask and the like. I created a bunch of files and couple of directories in my home and played around changing group ownership. I think what might have done it was changing a text file's group ownership to audio. Just a guess.

Anyway, one things I still have not understood about Debian is the fact that I cannot go into gnome as root. Neither have I been able to get hold of a live CD. All my Debian CD/DVD's have been install but would't boot live. Unless you meant to boot into any Debian derivative in which case I have a few including sidux, and a less known distro called DreamLinux.

Assuming I managed to get into a root terminal are saying I grep for su and sudo and change their permissions? Can you elaborate about what you mean I should do with "setuid"...?

Many thanks in advance
 
Old 01-27-2010, 10:57 PM   #4
siawash
Member
 
Registered: Jun 2004
Location: Ireland
Distribution: Zorin 6
Posts: 589

Original Poster
Rep: Reputation: 32
Here the files I was playing with in my home directory. I would appreciate it if you could walk me through what has to be done.

Code:
siawacsh@debian:~/xzy$ ls -l
total 4
drwxrwxrw- 2 root     audio 4096 2010-01-24 18:55 dir_2
-rw-r--r-- 1 siawacsh audio    0 2010-01-24 22:17 file1
-rw-r--r-- 1 root     audio    0 2010-01-24 18:46 file_1
-rw-r--r-- 1 siawacsh audio    0 2010-01-24 22:19 file2
-rw-r--r-- 1 siawacsh audio    0 2010-01-24 18:55 file_2
-rw-r--r-- 1 siawacsh users    0 2010-01-24 19:02 file_3
-rw-r--r-- 1 siawacsh audio    0 2010-01-24 22:24 file_4
-rw-r--r-- 1 siawacsh audio    0 2010-01-27 19:16 file_6
-rw-r--r-- 1 siawacsh audio    0 2010-01-27 20:00 file7
-rw-r--r-- 1 siawacsh audio    0 2010-01-27 19:55 file_7
siawacsh@debian:~/xzy$
 
Old 01-27-2010, 11:01 PM   #5
siawash
Member
 
Registered: Jun 2004
Location: Ireland
Distribution: Zorin 6
Posts: 589

Original Poster
Rep: Reputation: 32
Here is my fstab. At the moment /sdc1 which is my external ide/usb drive is not mounting any more. Sometimes the internal cdrom drive wont eject and when I try to do it manually i get an error saying drive is not mounting. A reboot solves it though.


Code:
 cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sdd       /home/siawacsh/cowon vfat defaults 
/dev/sdc1      /home/siawacsh/myhome ext3 defaults     0        3
/dev/sdb2       /               ext3    errors=remount-ro 0       1
/dev/sdb1       none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
siawacsh@debian:~$
 
Old 01-27-2010, 11:04 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You need to check the permissions of the sudo and su programs.
ls -l /usr/bin/sudo /bin/su
-rwsr-xr-x 1 root root 35904 2009-10-23 23:41 /bin/su
-rwsr-xr-x 1 root root 190248 2009-10-19 14:36 /usr/bin/sudo

You may need to boot into single user mode to fix it. First try logging in as root in one of the virtual terminals.

It is normal to not allow root logins in X. You should never do that.

You must have done more then change permissions in an xyz/ directory.
 
Old 01-28-2010, 08:52 AM   #7
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Boot from any live CD, it doesn't have to be Debian. Mount your local disk. Change the permissions with chmod to 4755 on su and sudo on the mounted disk.

Next time be more careful with chmod (do not lightly run chmod -R 777 ...).
 
Old 01-28-2010, 12:52 PM   #8
siawash
Member
 
Registered: Jun 2004
Location: Ireland
Distribution: Zorin 6
Posts: 589

Original Poster
Rep: Reputation: 32
I did exactly as AlucardZero instructions but still getting the following;


Code:
siawacsh@debian:~$ su
Password: 
setgid: Operation not permitted
siawacsh@debian:~$ sudo fdisk -l
sudo: must be setuid root
siawacsh@debian:~$
I booted into a live cd and booted straight into terminal. Then I mounted my /dev/sdb2 /mnt
Then chmod 4755 /bin/su* and chmod 4755 /usr/bin/sudo

I now remember another thing that I did which might have caused this.

I did chown -R cowon

cowon being a local directory listed in fstab at the time of issuing command my usb music player was connected it was taking a long time going through all the files. I decided to stop the command with Control-C then disconnected the drive.
 
Old 01-28-2010, 12:55 PM   #9
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
I said /mnt/bin/su* .

chown root /mnt/bin/su /mnt/usr/bin/sudo
chmod 4755 /mnt/bin/su /mnt/usr/bin/sudo
 
Old 01-28-2010, 02:28 PM   #10
siawash
Member
 
Registered: Jun 2004
Location: Ireland
Distribution: Zorin 6
Posts: 589

Original Poster
Rep: Reputation: 32
super user problem

Thanks for spelling the solution out for me. It worked a treat. Thank you to all you wonderful experts. I wish there was a way I could return the favor. Your certainly most welcome to Dublin.

As to your warning about chmod, I am learning on a blank system. All my personal data is on an external drive, so as long as I keep away from that the rest of the system can get rebuilt without too much agony.


Quote:
Originally Posted by AlucardZero View Post
Boot from any live CD, it doesn't have to be Debian. Mount your local disk. Change the permissions with chmod to 4755 on su and sudo on the mounted disk.

Next time be more careful with chmod (do not lightly run chmod -R 777 ...).
 
  


Reply



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
Difference betwwen : Locked User Account & Disabled User Accounts in Linux ? avklinux Linux - Security 1 02-04-2009 02:30 PM
user accounts rmorgan Linux - Server 0 10-31-2006 10:40 AM
LXer: Linux 101: Manage user accounts in a multi-user Linux environment ... LXer Syndicated Linux News 0 06-27-2006 07:03 AM
User accounts captain chaos Slackware 2 03-01-2006 04:24 PM
User Accounts petey *BSD 4 09-26-2002 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:03 PM.

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