Re: HELP! can't become root

2007-10-11 Thread Andrew Sackville-West
On Thu, Oct 11, 2007 at 01:16:27PM -0500, Jonathan Wilson wrote:
> On Thursday 11 October 2007 13:04, Jonathan Wilson wrote:
> > On Wednesday 10 October 2007 13:04, Andrew Sackville-West wrote:
> > > I seem to recall once I did a chown -R something and it followed the
> > > /. and /.. links in the directory so that it started walking up the
> > > directory tree. luckily I stopped it. Perhaps chmod -R is doing a
> > > similar thing?
> > >
> > > A
> >
> > That does /not/ happen with any utility's -R. They don't walk up the tree
> > with ../ , it would be way too dangerous to have any utility work that way.
> > Think about it. Below are some exampoles using * and even .* to prove it
> > (it's a little hard to read with line wrapping):
> 
> Actually, I was wrong! (partially) and it's somewhat frightening. It does 
> indeed climb up one level - just one, I don't know why.
> 
> (please note that in my examples I'm using a combination of ls -l and ls -ld )
> 
> Running chown -R .* does in fact, change the ownership of just one level up:
> 

... 

> 
> However, this would mean the OP had to do something like:
> cd /dev
> ch[mod] -R .*
> 
> because chown -R * does not climb the tree like .* does.
> 

maybe OP did 

cd /
chown -R /dev/.* 

in an attempt to get any hidden files in /dev? or maybe the finger
slipped. In any event, I *knew* I had encountered something like this
with chown affecting *WAY* more than I thought it should. IIRC, it ran
through my whole mail spool instead of just one user's stuff or
somthing like that.

A


signature.asc
Description: Digital signature


Re: HELP! can't become root

2007-10-11 Thread Jonathan Wilson
On Thursday 11 October 2007 13:16, Jonathan Wilson wrote:
>  It does
> indeed climb up one level - just one, I don't know why.
>

Well, I guess I do know why: because it's using ../

I'll crawl back under my rock now . . . 

JW

-- 

--
System Administrator - Cedar Creek Software http://www.cedarcreeksoftware.com
http://jwadmin.blogspot.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-11 Thread Andrew Sackville-West
On Thu, Oct 11, 2007 at 01:04:49PM -0500, Jonathan Wilson wrote:
> On Wednesday 10 October 2007 13:04, Andrew Sackville-West wrote:
> > On Tue, Oct 09, 2007 at 05:25:17PM -0700, tom arnall wrote:
> > > Well, I got a list of perm's for stuff in /dev (from a sarge system. I'm
> > > on etch). There were only two diff's: two sound devices. But there are
> > > lots of insane permissions throughout the rest of the system. Is this
> > > because when I did 'chmod -R 777 /dev' I also in effect did 'chmod -R 777
> > > /dev/hda1'? But when I do 'ls -R /dev/hda1' I get only  '/dev/hda1'. Why
> > > the diff' in the scope of the commands? And where do you read about this
> > > kind of thing?
> >
> > well, ls and chmod are different utilities, so the -R could easily have
> > different effects despite having apparently the same function.
> >
> > I seem to recall once I did a chown -R something and it followed the
> > /. and /.. links in the directory so that it started walking up the
> > directory tree. luckily I stopped it. Perhaps chmod -R is doing a
> > similar thing?
> >
> > A
> 
> That does /not/ happen with any utility's -R. They don't walk up the tree 
> with ../ , it would be way too dangerous to have any utility work that way. 

Absolutely dangerous. So maybe I'll amend my statement above with an
emphasis on the *seem* and *something*. The result was that I ended up
chowning a bunch of stuff I didn't want to with ensuing chaos. My
memory of the specifics are fuzzy. But it definitely ended up chowning
up the tree *somehow*.

> 
> The only way for a recursive run to get back up higher in the tree is 
> following a symlink (which is certainly a realistic possibility).

this may have been the case. 

A


signature.asc
Description: Digital signature


Re: HELP! can't become root

2007-10-11 Thread Jonathan Wilson
On Thursday 11 October 2007 13:04, Jonathan Wilson wrote:
> On Wednesday 10 October 2007 13:04, Andrew Sackville-West wrote:
> > I seem to recall once I did a chown -R something and it followed the
> > /. and /.. links in the directory so that it started walking up the
> > directory tree. luckily I stopped it. Perhaps chmod -R is doing a
> > similar thing?
> >
> > A
>
> That does /not/ happen with any utility's -R. They don't walk up the tree
> with ../ , it would be way too dangerous to have any utility work that way.
> Think about it. Below are some exampoles using * and even .* to prove it
> (it's a little hard to read with line wrapping):

Actually, I was wrong! (partially) and it's somewhat frightening. It does 
indeed climb up one level - just one, I don't know why.

(please note that in my examples I'm using a combination of ls -l and ls -ld )

Running chown -R .* does in fact, change the ownership of just one level up:

amethyst:/tmp/test/1/2/3/4# chown -R fred .*
amethyst:/tmp/test/1/2/3/4# ls -ld /tmp/test/1/2/
drwxr-xr-x 3 root root 72 2007-10-11 12:56 /tmp/test/1/2/
amethyst:/tmp/test/1/2/3/4# ls -ld /tmp/test/1/2/3/
drwxr-xr-x 3 fred root 72 2007-10-11 12:56 /tmp/test/1/2/3/
amethyst:/tmp/test/1/2/3/4# ls -ld /tmp/test/1/2/3/4/
drwxr-xr-x 3 fred root 72 2007-10-11 13:07 /tmp/test/1/2/3/4/

Or viewed another way:
amethyst:/tmp/test/1/2/3/4# ls -ld .
drwxr-xr-x 3 jw root 72 2007-10-11 13:07 .
amethyst:/tmp/test/1/2/3/4# ls -ld ../
drwxr-xr-x 4 jw root 96 2007-10-11 13:10 ../
amethyst:/tmp/test/1/2/3/4# ls -ld ../../
drwxr-xr-x 3 root root 72 2007-10-11 12:56 ../../

AND, what's really uncomfortable is that it changes the ownership on any other 
directories that are inside the next folder up:

amethyst:/tmp/test/1/2/3/4# chown -R jw .*
amethyst:/tmp/test/1/2/3/4# ls -l /tmp/test/1/
total 0
drwxr-xr-x 3 root root 72 2007-10-11 12:56 2
amethyst:/tmp/test/1/2/3/4# ls -l /tmp/test/1/2/
total 0
drwxr-xr-x 4 jw root 96 2007-10-11 13:10 3
amethyst:/tmp/test/1/2/3/4# ls -l /tmp/test/1/2/3/
total 0
drwxr-xr-x 3 jw root 72 2007-10-11 13:07 4
drwxr-xr-x 3 jw root 72 2007-10-11 13:10 sub1
amethyst:/tmp/test/1/2/3/4# ls -l /tmp/test/1/2/3/sub1/
total 0
drwxr-xr-x 3 jw root 72 2007-10-11 13:10 sub2
amethyst:/tmp/test/1/2/3/4# ls -l /tmp/test/1/2/3/sub1/sub2/
total 0
drwxr-xr-x 2 jw root 48 2007-10-11 13:10 sub3

However, this would mean the OP had to do something like:
cd /dev
ch[mod] -R .*

because chown -R * does not climb the tree like .* does.

JW

-- 

--
System Administrator - Cedar Creek Software http://www.cedarcreeksoftware.com
http://jwadmin.blogspot.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-11 Thread Jonathan Wilson
On Wednesday 10 October 2007 13:04, Andrew Sackville-West wrote:
> On Tue, Oct 09, 2007 at 05:25:17PM -0700, tom arnall wrote:
> > Well, I got a list of perm's for stuff in /dev (from a sarge system. I'm
> > on etch). There were only two diff's: two sound devices. But there are
> > lots of insane permissions throughout the rest of the system. Is this
> > because when I did 'chmod -R 777 /dev' I also in effect did 'chmod -R 777
> > /dev/hda1'? But when I do 'ls -R /dev/hda1' I get only  '/dev/hda1'. Why
> > the diff' in the scope of the commands? And where do you read about this
> > kind of thing?
>
> well, ls and chmod are different utilities, so the -R could easily have
> different effects despite having apparently the same function.
>
> I seem to recall once I did a chown -R something and it followed the
> /. and /.. links in the directory so that it started walking up the
> directory tree. luckily I stopped it. Perhaps chmod -R is doing a
> similar thing?
>
> A

That does /not/ happen with any utility's -R. They don't walk up the tree 
with ../ , it would be way too dangerous to have any utility work that way. 
Think about it. Below are some exampoles using * and even .* to prove it 
(it's a little hard to read with line wrapping):

amethyst:/tmp# mkdir -p test/1/2/3/4/5/6/7/8/9/0/1/2/3/4
amethyst:/tmp# ls -l test
total 0
drwxr-xr-x 3 root root 72 2007-10-11 12:56 1
amethyst:/tmp# ls -l test
total 0
drwxr-xr-x 3 root root 72 2007-10-11 12:56 1
amethyst:/tmp# ls -ld test
drwxr-xr-x 3 root root 72 2007-10-11 12:57 test
amethyst:/tmp# ls -ld test/
drwxr-xr-x 3 root root 72 2007-10-11 12:57 test/
amethyst:/tmp# ls -ld test/1/
drwxr-xr-x 3 root root 72 2007-10-11 12:56 test/1/
amethyst:/tmp# cd test/1/2/3/4/
amethyst:/tmp/test/1/2/3/4# ls -l
total 0
drwxr-xr-x 3 root root 72 2007-10-11 12:56 5
amethyst:/tmp/test/1/2/3/4# chown -R jw *
amethyst:/tmp/test/1/2/3/4# ls -l
total 0
drwxr-xr-x 3 jw root 72 2007-10-11 12:56 5
amethyst:/tmp/test/1/2/3/4# ls -ld .
drwxr-xr-x 3 root root 72 2007-10-11 12:56 .
amethyst:/tmp/test/1/2/3/4# ls -lA
total 0
drwxr-xr-x 3 jw root 72 2007-10-11 12:56 5
amethyst:/tmp/test/1/2/3/4# ls -la
total 0
drwxr-xr-x 3 root root 72 2007-10-11 12:56 .
drwxr-xr-x 3 root root 72 2007-10-11 12:56 ..
drwxr-xr-x 3 jw   root 72 2007-10-11 12:56 5

amethyst:/tmp/test/1/2/3/4# chown -R fred .*
amethyst:/tmp/test/1/2/3/4# ls -l
total 0
drwxr-xr-x 3 fred root 72 2007-10-11 12:56 5
amethyst:/tmp/test/1/2/3/4# ls -ld .
drwxr-xr-x 3 fred root 72 2007-10-11 12:56 .

The only way for a recursive run to get back up higher in the tree is 
following a symlink (which is certainly a realistic possibility).

JW



-- 

--
System Administrator - Cedar Creek Software http://www.cedarcreeksoftware.com
http://jwadmin.blogspot.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-10 Thread Andrew Sackville-West
On Tue, Oct 09, 2007 at 05:25:17PM -0700, tom arnall wrote:
> Well, I got a list of perm's for stuff in /dev (from a sarge system. I'm on 
> etch). There were only two diff's: two sound devices. But there are lots of 
> insane permissions throughout the rest of the system. Is this because when I  
> did 'chmod -R 777 /dev' I also in effect did 'chmod -R 777 /dev/hda1'? But 
> when I do 'ls -R /dev/hda1' I get only  '/dev/hda1'. Why the diff' in the 
> scope of the commands? And where do you read about this kind of thing?

well, ls and chmod are different utilities, so the -R could easily have
different effects despite having apparently the same function. 

I seem to recall once I did a chown -R something and it followed the
/. and /.. links in the directory so that it started walking up the
directory tree. luckily I stopped it. Perhaps chmod -R is doing a
similar thing? 

A


signature.asc
Description: Digital signature


Re: HELP! can't become root

2007-10-10 Thread tom arnall
Well, I got a list of perm's for stuff in /dev (from a sarge system. I'm on 
etch). There were only two diff's: two sound devices. But there are lots of 
insane permissions throughout the rest of the system. Is this because when I  
did 'chmod -R 777 /dev' I also in effect did 'chmod -R 777 /dev/hda1'? But 
when I do 'ls -R /dev/hda1' I get only  '/dev/hda1'. Why the diff' in the 
scope of the commands? And where do you read about this kind of thing?

Thanks,

tom




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-07 Thread John Stumbles

Kevin Mark wrote:


http://kevin.vanzonneveld.net/techblog/article/restore_packages_using_dselectupgrade/
This is a basic HOWTO for the above advice.


Though one needs to save and restore one's sources.lst if it's not the 
system default in order to reinstall all the packages. And if the distro 
version has moved on since the original install some more jumping 
through hoops will be required.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: HELP! can't become root

2007-10-06 Thread Jeff D

On Sat, 6 Oct 2007, tom arnall wrote:


On Saturday 06 October 2007 20:46, Kevin Mark wrote:

On Sat, Oct 06, 2007 at 11:30:42AM -0700, tom arnall wrote:

Realistically, is there any way I can fix my system so I can log in  as
root, without reinstalling the OS?


Here is the question: lets say you fix the initial problem and CAN log
in as root. What next? You have a few hundred files with the wrong
permission.

Q: How do you fix this? A: with great pains!

On an average unix system, you can access the data or configuration by
using a live cd or similar, then back that up. Now that you have the
important data like the output of 'dpkg --get-selections?, you now know
what packages to install when you reformat the partition! So you do a
base install, use 'dpkg --set-selections', do the other bits to install
the rest of the packages, and in about 1/2 a day, you can be back to a
reasonable state.

The other way is to fiddle with a few hundred files until you get an
only mildly broken system. At least that is the way I look at it, YMMV.
K


But I would still like to get a list of the normal /dev perm's. Keep in mind
that my system, so far ;) , seems to be functioning normally, except I can't
do 'su'. Another consideration is that I'm thinking of getting new hardware
and would as soon put off the systems work until then.



heres a list of files that need 4755 perms, at least on my system, you 
may or may not have some of these files:

/bin/su
/bin/mount
/bin/umount
/bin/ping
/bin/ping6

/usr/bin/newgrp
/usr/bin/chfn
/usr/bin/chsh
/usr/bin/gpasswd
/usr/bin/passwd
/usr/bin/traceroute.lbl
/usr/bin/gpg
/usr/bin/mtr
/usr/bin/sudoedit
/usr/bin/sudo
/usr/bin/fping
/usr/bin/fping6
/usr/bin/sperl5.8.8
/usr/bin/traceroute6
/usr/bin/netkit-rcp
/usr/bin/netkit-rsh
/usr/bin/netkit-rlogin

-+-
8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Techno.

Re: HELP! can't become root

2007-10-06 Thread Kevin Mark
On Sat, Oct 06, 2007 at 09:11:30PM -0700, tom arnall wrote:
> On Saturday 06 October 2007 20:46, Kevin Mark wrote:
> > On Sat, Oct 06, 2007 at 11:30:42AM -0700, tom arnall wrote:
> > > Realistically, is there any way I can fix my system so I can log in  as
> > > root, without reinstalling the OS?
> >
> > Here is the question: lets say you fix the initial problem and CAN log
> > in as root. What next? You have a few hundred files with the wrong
> > permission.
> >
> > Q: How do you fix this? A: with great pains!
> >
> > On an average unix system, you can access the data or configuration by
> > using a live cd or similar, then back that up. Now that you have the
> > important data like the output of 'dpkg --get-selections´, you now know
> > what packages to install when you reformat the partition! So you do a
> > base install, use 'dpkg --set-selections', do the other bits to install
> > the rest of the packages, and in about 1/2 a day, you can be back to a
> > reasonable state.
> >
> > The other way is to fiddle with a few hundred files until you get an
> > only mildly broken system. At least that is the way I look at it, YMMV.
> > K
> 
> But I would still like to get a list of the normal /dev perm's. Keep in mind 
> that my system, so far ;) , seems to be functioning normally, except I can't 
> do 'su'. Another consideration is that I'm thinking of getting new hardware 
> and would as soon put off the systems work until then.
> 

If you can use dpkg and assocated commands, you can try to 'reinstall'
most of the ESSENTIAL packages until the command works, or maybe trace
the reverse dependencies one by one and reinstall them until it works. I
once had a command that was buggy and I did this and it seem to fix it.
-K
E.g. If command X depends on A, B and C. restall them. IIRC this should
unpack the tarballs from the binary packages and overwrite the files
and their permissions.
-K
-- 
|  .''`.  == Debian GNU/Linux == |   my web site:   |
| : :' :  The  Universal |mysite.verizon.net/kevin.mark/|
| `. `'  Operating System| go to counter.li.org and |
|   `-http://www.debian.org/ |be counted! #238656   |
|  my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
|join the new debian-community.org to help Debian!  |
|___  Unless I ask to be CCd, assume I am subscribed ___|



Re: HELP! can't become root

2007-10-06 Thread Kevin Mark
On Sat, Oct 06, 2007 at 08:59:10PM -0700, tom arnall wrote:
> On Saturday 06 October 2007 20:46, Kevin Mark wrote:
> > On Sat, Oct 06, 2007 at 11:30:42AM -0700, tom arnall wrote:
> > > Realistically, is there any way I can fix my system so I can log in  as
> > > root, without reinstalling the OS?
> >
> > Here is the question: lets say you fix the initial problem and CAN log
> > in as root. What next? You have a few hundred files with the wrong
> > permission.
> >
> > Q: How do you fix this? A: with great pains!
> >
> > On an average unix system, you can access the data or configuration by
> > using a live cd or similar, then back that up. Now that you have the
> > important data like the output of 'dpkg --get-selections´, you now know
> > what packages to install when you reformat the partition! So you do a
> > base install, use 'dpkg --set-selections', do the other bits to install
> > the rest of the packages, and in about 1/2 a day, you can be back to a
> > reasonable state.
> >
> > The other way is to fiddle with a few hundred files until you get an
> > only mildly broken system. At least that is the way I look at it, YMMV.
> > K
> 
> 
> 'tis sage advice, i fear. and thanks for the 'get-selections' info. this list 
> is the main reason i stay debian.

http://kevin.vanzonneveld.net/techblog/article/restore_packages_using_dselectupgrade/
This is a basic HOWTO for the above advice.
=K
-- 
|  .''`.  == Debian GNU/Linux == |   my web site:   |
| : :' :  The  Universal |mysite.verizon.net/kevin.mark/|
| `. `'  Operating System| go to counter.li.org and |
|   `-http://www.debian.org/ |be counted! #238656   |
|  my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
|join the new debian-community.org to help Debian!  |
|___  Unless I ask to be CCd, assume I am subscribed ___|



Re: HELP! can't become root

2007-10-06 Thread tom arnall
On Saturday 06 October 2007 20:46, Kevin Mark wrote:
> On Sat, Oct 06, 2007 at 11:30:42AM -0700, tom arnall wrote:
> > Realistically, is there any way I can fix my system so I can log in  as
> > root, without reinstalling the OS?
>
> Here is the question: lets say you fix the initial problem and CAN log
> in as root. What next? You have a few hundred files with the wrong
> permission.
>
> Q: How do you fix this? A: with great pains!
>
> On an average unix system, you can access the data or configuration by
> using a live cd or similar, then back that up. Now that you have the
> important data like the output of 'dpkg --get-selections´, you now know
> what packages to install when you reformat the partition! So you do a
> base install, use 'dpkg --set-selections', do the other bits to install
> the rest of the packages, and in about 1/2 a day, you can be back to a
> reasonable state.
>
> The other way is to fiddle with a few hundred files until you get an
> only mildly broken system. At least that is the way I look at it, YMMV.
> K

But I would still like to get a list of the normal /dev perm's. Keep in mind 
that my system, so far ;) , seems to be functioning normally, except I can't 
do 'su'. Another consideration is that I'm thinking of getting new hardware 
and would as soon put off the systems work until then.





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread tom arnall
On Saturday 06 October 2007 20:46, Kevin Mark wrote:
> On Sat, Oct 06, 2007 at 11:30:42AM -0700, tom arnall wrote:
> > Realistically, is there any way I can fix my system so I can log in  as
> > root, without reinstalling the OS?
>
> Here is the question: lets say you fix the initial problem and CAN log
> in as root. What next? You have a few hundred files with the wrong
> permission.
>
> Q: How do you fix this? A: with great pains!
>
> On an average unix system, you can access the data or configuration by
> using a live cd or similar, then back that up. Now that you have the
> important data like the output of 'dpkg --get-selections´, you now know
> what packages to install when you reformat the partition! So you do a
> base install, use 'dpkg --set-selections', do the other bits to install
> the rest of the packages, and in about 1/2 a day, you can be back to a
> reasonable state.
>
> The other way is to fiddle with a few hundred files until you get an
> only mildly broken system. At least that is the way I look at it, YMMV.
> K


'tis sage advice, i fear. and thanks for the 'get-selections' info. this list 
is the main reason i stay debian.




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread Kevin Mark
On Sat, Oct 06, 2007 at 11:30:42AM -0700, tom arnall wrote:
> Realistically, is there any way I can fix my system so I can log in  as root, 
> without reinstalling the OS?
> 

Here is the question: lets say you fix the initial problem and CAN log
in as root. What next? You have a few hundred files with the wrong
permission. 

Q: How do you fix this? A: with great pains!

On an average unix system, you can access the data or configuration by
using a live cd or similar, then back that up. Now that you have the
important data like the output of 'dpkg --get-selections´, you now know
what packages to install when you reformat the partition! So you do a
base install, use 'dpkg --set-selections', do the other bits to install
the rest of the packages, and in about 1/2 a day, you can be back to a
reasonable state. 

The other way is to fiddle with a few hundred files until you get an
only mildly broken system. At least that is the way I look at it, YMMV.
K
-- 
|  .''`.  == Debian GNU/Linux == |   my web site:   |
| : :' :  The  Universal |mysite.verizon.net/kevin.mark/|
| `. `'  Operating System| go to counter.li.org and |
|   `-http://www.debian.org/ |be counted! #238656   |
|  my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
|join the new debian-community.org to help Debian!  |
|___  Unless I ask to be CCd, assume I am subscribed ___|



Re: HELP! can't become root

2007-10-06 Thread tom arnall
On Saturday 06 October 2007 11:58, Thilo Six wrote:
> David Fox wrote the following on 06.10.2007 20:52
>
> <<-snip->>
>
> > Or, boot a rescue cd/environment such as knoppix, mount your root
> > partition and do a chroot into there, do whatever needed to clean up.
>
> You mean something like checking each and every directory´s and file´s
> permission compare them with what they should be change them accordingly
> and proceed?
>
> Yap should work.
>


but how do i find out what the perm's should be?





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread tom arnall
On Saturday 06 October 2007 11:25, Thilo Six wrote:
> tom arnall wrote the following on 06.10.2007 20:13
>
> <<-snip->>
>
> > Indeed. From now on, I am not going to work as root without first making
> > an entry in my system log as to what I'm going to do.
>
> sudo will do that for you without extra modifications from you.
> *But* sudo will only make syslog entries *after* the command is send.
>
> > All of the problems I've
> > created have come from impatience. Perhaps this practice will help.
> >


whenever i make more than a trivial change on my system i make an entry in my 
own private log, which i call a system log. now i'm going to enter at least 
an outline of the work >before i do the work.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread Thilo Six
David Fox wrote the following on 06.10.2007 20:52

<<-snip->>

> Or, boot a rescue cd/environment such as knoppix, mount your root
> partition and do a chroot into there, do whatever needed to clean up.

You mean something like checking each and every directory´s and file´s
permission compare them with what they should be change them accordingly and
proceed?

Yap should work.


>> tom

bye
-- 
Thilo

key: 0x4A411E09


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread David Fox
On 10/6/07, tom arnall <[EMAIL PROTECTED]> wrote:
> Realistically, is there any way I can fix my system so I can log in  as root,
> without reinstalling the OS?

aptitude -reinstall base-files, perhaps

Or, boot a rescue cd/environment such as knoppix, mount your root
partition and do a chroot into there, do whatever needed to clean up.


> tom


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread Thilo Six
tom arnall wrote the following on 06.10.2007 20:30
> Realistically, is there any way I can fix my system so I can log in  as root, 
> without reinstalling the OS?
> 
> Thanks,
> 
> tom

Well see:
in /etc there is mosly everything 644 *BUT* there are specific files that are
440 or 755.
And there maybe even pre- or postinst scripts that check for the *right*
permissions on a specific file (e.g. the programms that can be suid).

So answer yourself.


-- 
Thilo

key: 0x4A411E09


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread tom arnall
Realistically, is there any way I can fix my system so I can log in  as root, 
without reinstalling the OS?

Thanks,

tom


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread Thilo Six
tom arnall wrote the following on 06.10.2007 20:13

<<-snip->>

> Indeed. From now on, I am not going to work as root without first making an 
> entry in my system log as to what I'm going to do.

sudo will do that for you without extra modifications from you.
*But* sudo will only make syslog entries *after* the command is send.

> All of the problems I've 
> created have come from impatience. Perhaps this practice will help.
> 
> tom

nice day dude
-- 
Thilo

key: 0x4A411E09


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread tom arnall
On Saturday 06 October 2007 10:53, Thilo Six wrote:
> John Stumbles wrote the following on 06.10.2007 17:39
>
> <<-snip->>
>
> > But surely doing chmod -R /dev/hda1 isn't the same as doing chmod -R /
> > (where /dev/hda1 is mounted as /) is it?
>
> It depends on your partitionlayout.
>
> Apart from that:
> tom once I 'rm -rf *' without recognizing I am in the wrong directory.
> And since it was a Gentoo that day where compiling the system took ~1 whole
> week with the system I had.
> Guess who is the more 'the profoundly embarrassed loose cannon' you or me?
>
> :)
>
> If there would ever be a 'geek' pretending he never did such fault I would
> not belive he is a geek.
>
> So the good news is: you learn from it.
>


Indeed. From now on, I am not going to work as root without first making an 
entry in my system log as to what I'm going to do. All of the problems I've 
created have come from impatience. Perhaps this practice will help.

tom




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread Thilo Six
John Stumbles wrote the following on 06.10.2007 17:39

<<-snip->>

> But surely doing chmod -R /dev/hda1 isn't the same as doing chmod -R / 
> (where /dev/hda1 is mounted as /) is it?

It depends on your partitionlayout.

Apart from that:
tom once i 'rm -rf *' without recognizing i am in the wrong directory.
And since it was a Gentoo that day where compiling the system took ~1 whole
week with the system i had.
Guess who is the more 'the profoundly embarrassed loose cannon' you or me?

:)

If there would ever be a 'geek' pretending he never did such fault i would
not belive he is a geek.

So the good news is: you learn from it.


bye
-- 
Thilo

key: 0x4A411E09


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-06 Thread John Stumbles

Thilo Six wrote:


What you did is:

chmod -R /dev 777 as it seems

where inside /dev is your whole system ( e.g. /dev/hda1)


But surely doing chmod -R /dev/hda1 isn't the same as doing chmod -R / 
(where /dev/hda1 is mounted as /) is it?



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: HELP! can't become root

2007-10-05 Thread Mumia W..

On 10/03/2007 02:12 PM, tom arnall wrote:
I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed out 
of it after ~3 min's.) now I can't become root. Some examples:

[...]


After you get this fixed, I suggest that you create a tar backup of your 
/dev directory. It's best to do this while you're not running the 
system, because special directories such as /dev/pts will be copied 
incorrectly.


I just made my backup of Sarge's /dev directory. If you do it while 
running the O/S, you'll have to remove files like these from the tar file:


dev/core
dev/pts/0
dev/pts/1
dev/pts/2
dev/pts/3
dev/ram
dev/fd
dev/stdin
dev/stdout
dev/stderr

Remove everything in dev/pts/ from the tar file.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: HELP! can't become root

2007-10-05 Thread tom arnall
On Friday 05 October 2007 11:17, Sven Joachim wrote:
> tom arnall <[EMAIL PROTECTED]> writes:
> > there is a change in the behavior when i try to log in as root. instead
> > of: setgid: Operation not permitted  after inputting the password, i get:
> > login incorrect   right after inputting 'root'.
>
> Do you have an entry for root in /etc/passwd?

root:x:0:0:root:/root:/bin/bash


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-05 Thread Sven Joachim
tom arnall <[EMAIL PROTECTED]> writes:

> there is a change in the behavior when i try to log in as root. instead of: 
> setgid: Operation not permitted  after inputting the password, i get: login 
> incorrect   right after inputting 'root'.

Do you have an entry for root in /etc/passwd?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-05 Thread tom arnall
On Friday 05 October 2007 10:15, Andrew Sackville-West wrote:
> On Fri, Oct 05, 2007 at 09:47:04AM -0700, tom arnall wrote:
> > On Thursday 04 October 2007 20:30, Rob Mahurin wrote:
>
> ...
>
> > > Can you "sudo chmod" to repair your permissions damage?  I can send
> > > you an output from "find /dev -ls" if you don't have another machine
> > > to compare against.
>
> ...
>
> > Indeed I have no machine to check my /dev perm's. If you could send me
> > the output I'd be much obliged. If you want to send it direct:
> > [EMAIL PROTECTED]
> >
> > I got my fonts back by giving the correct permissions to my home
> > directory and to .dmrc. Now the only clear problem is being able to log
> > in as root.
>
> the problem is that three minutes of chmod'ing down into /dev is going
> to change permissions on all sorts of stuff in the system. You now
> probably have significant numbers of binaries that are 777 and
> shouldn't be, for example. If you really want to fix it, you'll have
> to look at a whole system tree.
>
> Or reinstall a bunch of packages in hopes that it fixes up the
> perms. Find one that you know is wrong and do an
>
> aptitude reinstall 
>
> and see what happens. If it fixes the perms, then I'd follow it up
> with
>
> dpkg -l | awk '/^ii/ {print $2}' | xargs aptitude reinstall
>
> untested.
>
> The perms of /dev should fix themselves up automatically on reboot as
> udev should be recreating the devices on the fly.
>
> A


other than the fact that the system becomes vulnerable to attacks via my 
internet connection, what is the problem with binaries with incorrect 
permissions?

is there any simple way to enable 'su' for root?

tom


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-05 Thread Andrew Sackville-West
On Fri, Oct 05, 2007 at 09:47:04AM -0700, tom arnall wrote:
> On Thursday 04 October 2007 20:30, Rob Mahurin wrote:
...
> > Can you "sudo chmod" to repair your permissions damage?  I can send
> > you an output from "find /dev -ls" if you don't have another machine
> > to compare against.
...
> 
> Indeed I have no machine to check my /dev perm's. If you could send me the 
> output I'd be much obliged. If you want to send it direct: 
> [EMAIL PROTECTED]
> 
> I got my fonts back by giving the correct permissions to my home directory 
> and 
> to .dmrc. Now the only clear problem is being able to log in as root.

the problem is that three minutes of chmod'ing down into /dev is going
to change permissions on all sorts of stuff in the system. You now
probably have significant numbers of binaries that are 777 and
shouldn't be, for example. If you really want to fix it, you'll have
to look at a whole system tree. 

Or reinstall a bunch of packages in hopes that it fixes up the
perms. Find one that you know is wrong and do an

aptitude reinstall 

and see what happens. If it fixes the perms, then I'd follow it up
with

dpkg -l | awk '/^ii/ {print $2}' | xargs aptitude reinstall

untested. 

The perms of /dev should fix themselves up automatically on reboot as
udev should be recreating the devices on the fly.

A


signature.asc
Description: Digital signature


Re: HELP! can't become root

2007-10-05 Thread tom arnall
On Wednesday 03 October 2007 12:17, Douglas A. Tutty wrote:
> On Wed, Oct 03, 2007 at 12:12:52PM -0700, tom arnall wrote:
> > I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed
> > out of it after ~3 min's.) now I can't become root. Some examples:
> >
> > [EMAIL PROTECTED]:/bin$ sudo /usr/src/modules/alsa-driver/snddevices
> > sudo: /etc/sudoers is mode 0777, should be 0440
> > [EMAIL PROTECTED]:/bin$ su
> > Password:
> > setgid: Operation not permitted
> > [EMAIL PROTECTED]:/bin$
> >
> >
> > When I try to log in as root on a pseudo terminal, I get:
> >
> > setgid: operation not permitted
> >
> > I can log in as myself.
> >
> > Also, is there other damage that i might have done with the 'chmod'?
>
> You'd have to know what files got altered.  For example, you say you
> chmoded /dev.  Then how did /etc/sudoers get changed?
>
> Can you boot single-user mode and login as root?
>
> Do you have good backups of your data?
>
> Doug.


there is a change in the behavior when i try to log in as root. instead of: 
setgid: Operation not permitted  after inputting the password, i get: login 
incorrect   right after inputting 'root'.

sudo works now. i think it was because i changed the perm's on sudoers

thanks,

tom



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-05 Thread tom arnall
On Thursday 04 October 2007 20:30, Rob Mahurin wrote:
> On Thu, Oct 04, 2007 at 08:06:56PM -0700, tom arnall wrote:
> > > > I got impatient with an aumix error and did 'chmod -R /dev' (and
> > > > ctl-C'ed out of it after ~3 min's.) now I can't become root. Some
> > > > examples:
>
> [...]
>
> > I've been running the system for the last couple of days. The only
> > visible problems are:
> >
> > the font stinks for firefox.
> > i can't become root, not even in single-user mode, but I can 'sudo' all
> > I want.
> >
> > is it possible I could fix the two problems without having to reinstall?
>
> Can you "sudo chmod" to repair your permissions damage?  I can send
> you an output from "find /dev -ls" if you don't have another machine
> to compare against.
>
> Rob
>
> --
> Rob Mahurin
> Dept. Of Physics & Astronomy
> University of Tennessee   phone:  865 207 2594
> Knoxville, TN  37996  email:  [EMAIL PROTECTED]


Rob,

Indeed I have no machine to check my /dev perm's. If you could send me the 
output I'd be much obliged. If you want to send it direct: 
[EMAIL PROTECTED]

I got my fonts back by giving the correct permissions to my home directory and 
to .dmrc. Now the only clear problem is being able to log in as root.

I am running KDE for my desktop.

Thanks,

tom



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-04 Thread Rob Mahurin
On Thu, Oct 04, 2007 at 08:06:56PM -0700, tom arnall wrote:
> > > I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed
> > > out of it after ~3 min's.) now I can't become root. Some examples:
[...]
> i've been running the system for the last couple of days. the only visible 
> problems are:
> 
>   the font stinks for firefox.
>   i can't become root, not even in single-user mode, but i can 'sudo' all 
> i want.
>   
> is it possible i could fix the two problems without having to reinstall?

Can you "sudo chmod" to repair your permissions damage?  I can send
you an output from "find /dev -ls" if you don't have another machine
to compare against.

Rob

-- 
Rob Mahurin
Dept. of Physics & Astronomy
University of Tennessee phone:  865 207 2594
Knoxville, TN  37996email:  [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-04 Thread tom arnall
On Wednesday 03 October 2007 12:38, Andrew Sackville-West wrote:
> On Wed, Oct 03, 2007 at 12:12:52PM -0700, tom arnall wrote:
> > I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed
> > out of it after ~3 min's.) now I can't become root. Some examples:
>
> wow, that's ugly. And since it went for ~3mins that's a lot of
> chown'ed files. I agree with others, just easier to reinstall or
> restore from backup. If you want to fix it as an exercise, try booting
> into /bin/bash (add init=/bin/bash to your kernel boot line), and see
> what you can fix. It may be possible, I suppose, that you could fix up
> the perms/ownership on the right handful of things to allow you to
> become root and then you could  chroot into the system and essentially
> reinstall everything through apt.
>
> good luck
>
> A

i've been running the system for the last couple of days. the only visible 
problems are:

the font stinks for firefox.

i can't become root, not even in single-user mode, but i can 'sudo' all 
i 
want.

is it possible i could fix the two problems without having to reinstall?

thanks,

tom







-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-03 Thread Andrew Sackville-West
On Wed, Oct 03, 2007 at 01:13:15PM -0700, tom arnall wrote:
> 
> thanks all for being here. downloading the netinst CD now.
> 
> tom, the profoundly embarrassed loose cannon

its okay. I once did

rm -rf /etc /cups 

and didn't notice for a while.

A


signature.asc
Description: Digital signature


Re: HELP! can't become root

2007-10-03 Thread tom arnall
On Wednesday 03 October 2007 12:38, Andrew Sackville-West wrote:
> On Wed, Oct 03, 2007 at 12:12:52PM -0700, tom arnall wrote:
> > I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed
> > out of it after ~3 min's.) now I can't become root. Some examples:
>
> wow, that's ugly. And since it went for ~3mins that's a lot of
> chown'ed files. I agree with others, just easier to reinstall or
> restore from backup. If you want to fix it as an exercise, try booting
> into /bin/bash (add init=/bin/bash to your kernel boot line), and see
> what you can fix. It may be possible, I suppose, that you could fix up
> the perms/ownership on the right handful of things to allow you to
> become root and then you could  chroot into the system and essentially
> reinstall everything through apt.
>
> good luck
>
> A

thanks all for being here. downloading the netinst CD now.

tom, the profoundly embarrassed loose cannon


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-03 Thread Andrew Sackville-West
On Wed, Oct 03, 2007 at 12:12:52PM -0700, tom arnall wrote:
> I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed out 
> of it after ~3 min's.) now I can't become root. Some examples:

wow, that's ugly. And since it went for ~3mins that's a lot of
chown'ed files. I agree with others, just easier to reinstall or
restore from backup. If you want to fix it as an exercise, try booting
into /bin/bash (add init=/bin/bash to your kernel boot line), and see
what you can fix. It may be possible, I suppose, that you could fix up
the perms/ownership on the right handful of things to allow you to
become root and then you could  chroot into the system and essentially
reinstall everything through apt. 

good luck

A


signature.asc
Description: Digital signature


Re: HELP! can't become root

2007-10-03 Thread Thilo Six
tom arnall wrote the following on 03.10.2007 21:12
> I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed out 
> of it after ~3 min's.) now I can't become root. Some examples:
> 
>   [EMAIL PROTECTED]:/bin$ sudo /usr/src/modules/alsa-driver/snddevices
>   sudo: /etc/sudoers is mode 0777, should be 0440
>   [EMAIL PROTECTED]:/bin$ su
>   Password:
>   setgid: Operation not permitted
>   [EMAIL PROTECTED]:/bin$
> 
> 
> When I try to log in as root on a pseudo terminal, I get:
> 
>   setgid: operation not permitted
> 
> I can log in as myself.
> 
> Also, is there other damage that i might have done with the 'chmod'?
> 
> Thanks,
> 
> tom arnall

i suggest you to reinstall. It´s not worth the hassle.
What you did is:

chmod -R /dev 777 as it seems

where inside /dev is your whole system ( e.g. /dev/hda1)



-- 
Thilo

key: 0x4A411E09


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



HELP! can't become root POSTSCRIPT

2007-10-03 Thread tom arnall
I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed out 
of it after ~3 min's.) now I can't become root. Some examples:

[EMAIL PROTECTED]:/bin$ sudo /usr/src/modules/alsa-driver/snddevices
sudo: /etc/sudoers is mode 0777, should be 0440
[EMAIL PROTECTED]:/bin$ su
Password:
setgid: Operation not permitted
[EMAIL PROTECTED]:/bin$


When I try to log in as root on a pseudo terminal, I get:

setgid: operation not permitted

I can log in as myself.

Also, is there other damage that i might have done with the 'chmod'?

Thanks,

tom arnall






-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: HELP! can't become root

2007-10-03 Thread Douglas A. Tutty
On Wed, Oct 03, 2007 at 12:12:52PM -0700, tom arnall wrote:
> I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed out 
> of it after ~3 min's.) now I can't become root. Some examples:
> 
>   [EMAIL PROTECTED]:/bin$ sudo /usr/src/modules/alsa-driver/snddevices
>   sudo: /etc/sudoers is mode 0777, should be 0440
>   [EMAIL PROTECTED]:/bin$ su
>   Password:
>   setgid: Operation not permitted
>   [EMAIL PROTECTED]:/bin$
> 
> 
> When I try to log in as root on a pseudo terminal, I get:
> 
>   setgid: operation not permitted
> 
> I can log in as myself.
> 
> Also, is there other damage that i might have done with the 'chmod'?

You'd have to know what files got altered.  For example, you say you
chmoded /dev.  Then how did /etc/sudoers get changed?

Can you boot single-user mode and login as root?

Do you have good backups of your data?

Doug.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



HELP! can't become root

2007-10-03 Thread tom arnall
I got impatient with an aumix error and did 'chmod -R /dev' (and ctl-C'ed out 
of it after ~3 min's.) now I can't become root. Some examples:

[EMAIL PROTECTED]:/bin$ sudo /usr/src/modules/alsa-driver/snddevices
sudo: /etc/sudoers is mode 0777, should be 0440
[EMAIL PROTECTED]:/bin$ su
Password:
setgid: Operation not permitted
[EMAIL PROTECTED]:/bin$


When I try to log in as root on a pseudo terminal, I get:

setgid: operation not permitted

I can log in as myself.

Also, is there other damage that i might have done with the 'chmod'?

Thanks,

tom arnall






-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]