Re: passwd: Permission denied ?

2009-10-07 Thread Jon Dowland
On Mon, Sep 21, 2009 at 03:37:01PM +0200, Sven Joachim wrote:
> No, they are not.  It's /etc/passwd, not /usr/bin/passwd.

Oops! (red with embarrassment)


signature.asc
Description: Digital signature


Re: passwd: Permission denied ?

2009-09-21 Thread Sven Joachim
On 2009-09-21 15:27 +0200, Jon Dowland wrote:

> On Fri, Sep 18, 2009 at 11:39:28AM +0200, Frank Bonnet wrote:
>
>> -rw-r--r-- 1 root root 1358 2009-09-18 09:21 /etc/passwd
>
> These permissions are wrong.

No, they are not.  It's /etc/passwd, not /usr/bin/passwd.

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: passwd: Permission denied ?

2009-09-21 Thread Jon Dowland
On Fri, Sep 18, 2009 at 11:39:28AM +0200, Frank Bonnet wrote:

> -rw-r--r-- 1 root root 1358 2009-09-18 09:21 /etc/passwd

These permissions are wrong.

The missing suid bit (as someone else pointed out) will
prevent anyone but root using it.

The missing e(x)ecute bit will prevent even root.

Either restore +x (and +s), or something like

# /lib/ld-2.9.so /usr/bin/passwd

I would also worry about *precicely how* the permissions
were changed.


-- 
Jon Dowland


signature.asc
Description: Digital signature


Re: passwd: Permission denied ?

2009-09-20 Thread Tzafrir Cohen
On Fri, Sep 18, 2009 at 09:34:12AM +0200, Frank Bonnet wrote:
> Hello
>
> I'm trying to change a local user passwd as root and I get this error  
> message ... which seems a bit unreal to me ...
>
>
> passwd: Permission denied
> passwd: password unchanged
>
>
> The machine is running Lenny 64 bits

Two places to look into:

1. /var/log/auth.log
2. /etc/pam.d/passwd 

-- 
Tzafrir Cohen | tzaf...@jabber.org | VIM is
http://tzafrir.org.il || a Mutt's
tzaf...@cohens.org.il ||  best
ICQ# 16849754 || friend


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: passwd: Permission denied ?

2009-09-18 Thread Ron Johnson

On 2009-09-18 02:34, Frank Bonnet wrote:

Hello

I'm trying to change a local user passwd as root and I get this error 
message ... which seems a bit unreal to me ...



passwd: Permission denied
passwd: password unchanged


The machine is running Lenny 64 bits


Dumb question: how are you trying to change the password?

--
Ron Johnson, Jr.
Jefferson LA  USA

"If God had wanted man to play soccer, he wouldn't have given
us arms."  Mike Ditka


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: passwd: Permission denied ?

2009-09-18 Thread Chris Davies
Frank Bonnet  wrote:
> I'm trying to change a local user passwd as root and I get this error 
> message ... which seems a bit unreal to me ...

> passwd: Permission denied

Suspect you've lost the setuid permission bit on /usr/bin/passwd:

ls -l /usr/bin/passwd
-rwsr-xr-x 1 root root 34392 2009-05-22 16:03 /usr/bin/passwd

If you don't see an 's' in the fourth character position then that's
the problem, and you can fix it with these commands run as root:

chown root:root /usr/bin/passwd
chmod u=rwx,go=rx,u+s /usr/bin/passwd   # 4755 if you insist

Chris


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: passwd: Permission denied ?

2009-09-18 Thread Frank Bonnet

Well after rebooting the machine it seems the / partition has a problem
fsck cannot correct the problem too

It might be a hardware problem ... (sigh !)



Jerome BENOIT wrote:



Frank Bonnet wrote:

Jerome BENOIT wrote:

Hello Frank,

what gives
ls -l /etc/passwd
lsattr /etc/passwd


well I am logged as root which is supposed in a UNIX world
to have access to all files of the local filesystem without
access right checking  huh ?


may be, but you issue is, as you said, unreal.

have you strace passwd to have a better idea of what is going on ?

Jerome



ls -l /etc/passwd
-rw-r--r-- 1 root root 1358 2009-09-18 09:21 /etc/passwd


lsattr /etc/passwd
--- /etc/passwd



?

Jerome

Frank Bonnet wrote:

Hello

I'm trying to change a local user passwd as root and I get this 
error message ... which seems a bit unreal to me ...



passwd: Permission denied
passwd: password unchanged


The machine is running Lenny 64 bits

Thank you












--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: passwd: Permission denied ?

2009-09-18 Thread Sven Joachim
On 2009-09-18 11:37 +0200, Jerome BENOIT wrote:

> I guess that `ls -l' is clean too:
> is the associated partition mounted as read-only ?

AFAIK in that case the error message would be "Read-only file system"
rather than "Permission denied".

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: passwd: Permission denied ?

2009-09-18 Thread Sven Joachim
On 2009-09-18 11:26 +0200, Frank Bonnet wrote:

> Sven Joachim wrote:
>> On 2009-09-18 09:34 +0200, Frank Bonnet wrote:
>>
>>> I'm trying to change a local user passwd as root and I get this error
>>> message ... which seems a bit unreal to me ...
>>>
>>>
>>> passwd: Permission denied
>>> passwd: password unchanged
>>
>> What does "lsattr /etc/passwd /etc/shadow" print?
>
> this ... how it has been changed ? this is a fresh install
> does this mean another admin has changed the default attr ?

This may happen because of an intruder or because of file system
corruption.  I've seen the latter a few times on this list.  But...

> lsattr /etc/passwd /etc/shadow
> --- /etc/passwd
> --- /etc/shadow

...this is how it's supposed to be, i.e. no special attributes.  Can
you run the process under strace?

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: passwd: Permission denied ?

2009-09-18 Thread Frank Bonnet

Jerome BENOIT wrote:

Hello,

Frank Bonnet wrote:

Sven Joachim wrote:

On 2009-09-18 09:34 +0200, Frank Bonnet wrote:


I'm trying to change a local user passwd as root and I get this error
message ... which seems a bit unreal to me ...


passwd: Permission denied
passwd: password unchanged


What does "lsattr /etc/passwd /etc/shadow" print?


this ... how it has been changed ? this is a fresh install
does this mean another admin has changed the default attr ?


lsattr /etc/passwd /etc/shadow
--- /etc/passwd
--- /etc/shadow



I guess that `ls -l' is clean too:
is the associated partition mounted as read-only ?

Jerome


no the files are standing on the / partition


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: passwd: Permission denied ?

2009-09-18 Thread Jerome BENOIT



Frank Bonnet wrote:

Jerome BENOIT wrote:

Hello Frank,

what gives
ls -l /etc/passwd
lsattr /etc/passwd


well I am logged as root which is supposed in a UNIX world
to have access to all files of the local filesystem without
access right checking  huh ?


may be, but you issue is, as you said, unreal.

have you strace passwd to have a better idea of what is going on ?

Jerome 




ls -l /etc/passwd
-rw-r--r-- 1 root root 1358 2009-09-18 09:21 /etc/passwd


lsattr /etc/passwd
--- /etc/passwd



?

Jerome

Frank Bonnet wrote:

Hello

I'm trying to change a local user passwd as root and I get this error 
message ... which seems a bit unreal to me ...



passwd: Permission denied
passwd: password unchanged


The machine is running Lenny 64 bits

Thank you









--
Jerome BENOIT
jgmbenoit_at_mailsnare_dot_net


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: passwd: Permission denied ?

2009-09-18 Thread Jerome BENOIT

Hello,

Frank Bonnet wrote:

Sven Joachim wrote:

On 2009-09-18 09:34 +0200, Frank Bonnet wrote:


I'm trying to change a local user passwd as root and I get this error
message ... which seems a bit unreal to me ...


passwd: Permission denied
passwd: password unchanged


What does "lsattr /etc/passwd /etc/shadow" print?


this ... how it has been changed ? this is a fresh install
does this mean another admin has changed the default attr ?


lsattr /etc/passwd /etc/shadow
--- /etc/passwd
--- /etc/shadow



I guess that `ls -l' is clean too:
is the associated partition mounted as read-only ?

Jerome



Sven







--
Jerome BENOIT
jgmbenoit_at_mailsnare_dot_net


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: passwd: Permission denied ?

2009-09-18 Thread Frank Bonnet

Jerome BENOIT wrote:

Hello Frank,

what gives
ls -l /etc/passwd
lsattr /etc/passwd


well I am logged as root which is supposed in a UNIX world
to have access to all files of the local filesystem without
access right checking  huh ?


ls -l /etc/passwd
-rw-r--r-- 1 root root 1358 2009-09-18 09:21 /etc/passwd


lsattr /etc/passwd
--- /etc/passwd



?

Jerome

Frank Bonnet wrote:

Hello

I'm trying to change a local user passwd as root and I get this error 
message ... which seems a bit unreal to me ...



passwd: Permission denied
passwd: password unchanged


The machine is running Lenny 64 bits

Thank you







--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: passwd: Permission denied ?

2009-09-18 Thread Frank Bonnet

Sven Joachim wrote:

On 2009-09-18 09:34 +0200, Frank Bonnet wrote:


I'm trying to change a local user passwd as root and I get this error
message ... which seems a bit unreal to me ...


passwd: Permission denied
passwd: password unchanged


What does "lsattr /etc/passwd /etc/shadow" print?


this ... how it has been changed ? this is a fresh install
does this mean another admin has changed the default attr ?


lsattr /etc/passwd /etc/shadow
--- /etc/passwd
--- /etc/shadow



Sven





--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: passwd: Permission denied ?

2009-09-18 Thread Jerome BENOIT

Hello Frank,

what gives 


ls -l /etc/passwd
lsattr /etc/passwd

?

Jerome

Frank Bonnet wrote:

Hello

I'm trying to change a local user passwd as root and I get this error 
message ... which seems a bit unreal to me ...



passwd: Permission denied
passwd: password unchanged


The machine is running Lenny 64 bits

Thank you




--
Jerome BENOIT
jgmbenoit_at_mailsnare_dot_net


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: passwd: Permission denied ?

2009-09-18 Thread Sven Joachim
On 2009-09-18 09:34 +0200, Frank Bonnet wrote:

> I'm trying to change a local user passwd as root and I get this error
> message ... which seems a bit unreal to me ...
>
>
> passwd: Permission denied
> passwd: password unchanged

What does "lsattr /etc/passwd /etc/shadow" print?

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org