Re: su: not running setuid

2007-10-23 Thread Mayank Jain
Hi,
No I am not able to login as root from other consoles also. 
I am able to ssh on this machine from other machines and is able to 
successfully login to this machine but from my console I am now even not able 
to login to this machine. It is not accepting my uname and passwd. Looks like 
I ma stuck at a big trouble.  
-- 
Regards
Mayank Jain(Nawal)
Niksun
9818390836
www.mayankjain.110mb.com 

On Monday 22 October 2007 19:28, Eric Crist wrote:
 If you executed the command you claim you did, you're system
 permissions are really screwed up.  You've changed ownership of
 *EVERY* file on the system to uname:wheel.  My best guess is that su
 is trying to run as uname (setuid) and it's not getting the
 permissions is needs.

 4th and long I'm guessing.  You're best of to punt and reinstall.
 Can you even log in as root from the console?

 Eric

 On Oct 22, 2007, at 1:51 PMOct 22, 2007, Mayank Jain wrote:
  Hi all,
 
  I have run chown -R uname:wheel . as root in the / directory. Now
  it is not
  allowing me to log in as su.
  Giving the following error
 
  su
  su: not running setuid
 
  I have also tried su -l but still same error. Can any body suggest
  me some
  solution to this problem.
 
  uname -a
  FreeBSD mayankjain.in.niksun.com 6.2-RC1-p1 FreeBSD 6.2-RC1-p1 #0:
  Mon Dec  4
  09:56:16 UTC 2006
  [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386
 
  I have also tried following but it didn't allow me to do so.
  chown  root:wheel /usr/bin/su
  chown: /usr/bin/su: Operation not permitted
 
  --
  Regards
  Mayank Jain(Nawal)
  Niksun
  9818390836
  www.mayankjain.110mb.com
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to freebsd-questions-
  [EMAIL PROTECTED]

 -
 Eric F Crist
 Secure Computing Networks


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: su: not running setuid

2007-10-23 Thread Mayank Jain
Hi,

Thanks a lot!!!
The fix you provided worked for me, I am able to switch from normal user to su 
but this I am able to do with the help of ssh login only. I am not able to 
login from my console. When I am trying to login from my console it is not 
accepting my username and password not even of root. Giving an error message 
of Login Incorrect. Below are the log messages which I am getting. 

Oct 23 09:35:39 deepak kernel: Trying to mount root from ufs:/dev/ad0s4a
Oct 23 09:35:57 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:35:57 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:02 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:02 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:08 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:08 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:13 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:13 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:18 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:18 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:19 deepak login: 2 LOGIN FAILURES ON ttyv0
Oct 23 09:36:23 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:23 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:28 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:28 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:33 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:33 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:39 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:39 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:44 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:44 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:49 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: cannot bind: Can't assign reque
sted address
Oct 23 09:36:49 deepak sm-mta[682]: daemon Daemon0: problem creating SMTP 
socket
Oct 23 09:36:49 deepak sm-mta[682]: NOQUEUE: SYSERR(root): opendaemonsocket: 
daemon Daemon0: server SMTP socket wedged: exit
ing
Oct 23 09:37:23 deepak su: deepak to root on /dev/ttyp0

Hope you will telll me some quick solution. 


-- 
Regards
Mayank Jain(Nawal)
+91-9818390836
www.mayankjain.110mb.com

On Monday 22 October 2007 20:21, Christopher Cowart wrote:
 On Mon, Oct 22, 2007 at 06:51:48PM +, Mayank Jain wrote:
  Hi all,
 
  I have run chown -R uname:wheel . as root in the / directory. Now it is
  not allowing me to log in as su.
  Giving the following error
 
  su
  su: not running setuid
 
  I have also tried su -l but still same error. Can any body suggest me
  some solution to this problem.
 
  uname -a
  FreeBSD mayankjain.in.niksun.com 6.2-RC1-p1 FreeBSD 6.2-RC1-p1 #0: Mon
  Dec  4 09:56:16 UTC 2006
  [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386
 
  I have also tried following but it didn't allow me to do so.
  chown  root:wheel /usr/bin/su
  chown: /usr/bin/su: Operation not permitted

 Unless you can find some local privilege escalation exploit, I'm
 thinking you're stuck. You can probably fix it in single-user mode:
 * Reboot
 * Pick single user mode from the boot menu
 * Accept the default shell
 $ fsck -p
 $ mount -u /
 $ mount -a -t ufs
 $ chown root /usr/bin/su

 But if the command above ran to completion, you probably have a mess of
 permissions on your filesystem. You may want to look into rebuilding /
 reinstalling world while you're in single.

 Good luck...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: su: not running setuid

2007-10-23 Thread Adam J Richardson

Christopher Cowart wrote:

Unless you can find some local privilege escalation exploit, I'm
thinking you're stuck. You can probably fix it in single-user mode:
* Reboot
* Pick single user mode from the boot menu
* Accept the default shell
$ fsck -p
$ mount -u /
$ mount -a -t ufs
$ chown root /usr/bin/su

But if the command above ran to completion, you probably have a mess of
permissions on your filesystem. You may want to look into rebuilding /
reinstalling world while you're in single. 


What about going to single user mode and editing /etc/passwd so the 
root line has the username uname? Or add user uname with UID 0?


Regards,
Adam J Richardson
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: su: not running setuid

2007-10-23 Thread Christopher Cowart
On Tue, Oct 23, 2007 at 09:09:04PM +0100, Adam J Richardson wrote:
 Christopher Cowart wrote:
 Unless you can find some local privilege escalation exploit, I'm
 thinking you're stuck. You can probably fix it in single-user mode:
 * Reboot
 * Pick single user mode from the boot menu
 * Accept the default shell
 $ fsck -p
 $ mount -u /
 $ mount -a -t ufs
 $ chown root /usr/bin/su
 But if the command above ran to completion, you probably have a mess of
 permissions on your filesystem. You may want to look into rebuilding /
 reinstalling world while you're in single. 
 
 What about going to single user mode and editing /etc/passwd so the root 
 line has the username uname? Or add user uname with UID 0?

The chown command would have looked up uname via libnss and used the
numeric UID to alter the filesystem entries. The most you could do here
is change the symbolic name for the uname user and make the ls -l
output look different. Either way, you're stuck with the files on the
filesystem not being owned by UID 0. I would highly recommend not
mucking with /etc/passwd and letting rebuild world fix things.

-- 
Chris Cowart
Lead Systems Administrator
Network  Infrastructure Services, RSSP-IT
UC Berkeley


pgp7j5Q3F2IX7.pgp
Description: PGP signature


Re: su: not running setuid

2007-10-22 Thread Chuck Swiger

On Oct 22, 2007, at 11:51 AM, Mayank Jain wrote:
I have run chown -R uname:wheel . as root in the / directory. Now  
it is not

allowing me to log in as su.
Giving the following error


Ouch-- you've managed to reset the setuid/setgid bits for the entire  
system.


You'll probably need to do a buildworld/installworld cycle or a  
reinstall to get this fixed.


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: su: not running setuid

2007-10-22 Thread James
On Mon, 2007-10-22 at 18:51 +, Mayank Jain wrote:

 Hi all,
 
 I have run chown -R uname:wheel . as root in the / directory. Now it is not 
 allowing me to log in as su.
 Giving the following error
 
 su
 su: not running setuid
 
 I have also tried su -l but still same error. Can any body suggest me some 
 solution to this problem.
 
 uname -a
 FreeBSD mayankjain.in.niksun.com 6.2-RC1-p1 FreeBSD 6.2-RC1-p1 #0: Mon Dec  4 
 09:56:16 UTC 2006 
 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386
 
 I have also tried following but it didn't allow me to do so.
 chown  root:wheel /usr/bin/su
 chown: /usr/bin/su: Operation not permitted


Well, you've broke that, then.
You have to restore correct owners to everything correctly.

The only thing I can think of is a fresh install, which I seem to recall
doesn't overwrite your home dirs, or /usr/local (can anyone back me up
on this?) and never, ever run a recursive ownership change from / again,
ever. Ever.

I'm not even certain you could manage a buildworld from here. Judging
from the fact tat you're running RC1-p1, I'd guess that you may not even
be familiar with what a buildworld is, is that right?

Why did you do that, incidentally? Whatever result you were trying to
achieve can probably be accomplished once your system is running
correctly, so let's find out what it was.

James

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: su: not running setuid

2007-10-22 Thread Eric Crist
If you executed the command you claim you did, you're system  
permissions are really screwed up.  You've changed ownership of  
*EVERY* file on the system to uname:wheel.  My best guess is that su  
is trying to run as uname (setuid) and it's not getting the  
permissions is needs.


4th and long I'm guessing.  You're best of to punt and reinstall.   
Can you even log in as root from the console?


Eric


On Oct 22, 2007, at 1:51 PMOct 22, 2007, Mayank Jain wrote:


Hi all,

I have run chown -R uname:wheel . as root in the / directory. Now  
it is not

allowing me to log in as su.
Giving the following error

su
su: not running setuid

I have also tried su -l but still same error. Can any body suggest  
me some

solution to this problem.

uname -a
FreeBSD mayankjain.in.niksun.com 6.2-RC1-p1 FreeBSD 6.2-RC1-p1 #0:  
Mon Dec  4

09:56:16 UTC 2006
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386

I have also tried following but it didn't allow me to do so.
chown  root:wheel /usr/bin/su
chown: /usr/bin/su: Operation not permitted

--
Regards
Mayank Jain(Nawal)
Niksun
9818390836
www.mayankjain.110mb.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions- 
[EMAIL PROTECTED]


-
Eric F Crist
Secure Computing Networks


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: su: not running setuid

2007-10-22 Thread Christopher Cowart
On Mon, Oct 22, 2007 at 06:51:48PM +, Mayank Jain wrote:
 Hi all,
 
 I have run chown -R uname:wheel . as root in the / directory. Now it is not 
 allowing me to log in as su.
 Giving the following error
 
 su
 su: not running setuid
 
 I have also tried su -l but still same error. Can any body suggest me some 
 solution to this problem.
 
 uname -a
 FreeBSD mayankjain.in.niksun.com 6.2-RC1-p1 FreeBSD 6.2-RC1-p1 #0: Mon Dec  4 
 09:56:16 UTC 2006 
 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386
 
 I have also tried following but it didn't allow me to do so.
 chown  root:wheel /usr/bin/su
 chown: /usr/bin/su: Operation not permitted

Unless you can find some local privilege escalation exploit, I'm
thinking you're stuck. You can probably fix it in single-user mode:
* Reboot
* Pick single user mode from the boot menu
* Accept the default shell
$ fsck -p
$ mount -u /
$ mount -a -t ufs
$ chown root /usr/bin/su

But if the command above ran to completion, you probably have a mess of
permissions on your filesystem. You may want to look into rebuilding /
reinstalling world while you're in single. 

Good luck...

-- 
Chris Cowart
Lead Systems Administrator
Network  Infrastructure Services, RSSP-IT
UC Berkeley


pgpbawGHsu8Y6.pgp
Description: PGP signature