View Single Post

   
  #6 (permalink)  
Old 01-16-2008, 05:57 PM
Hinnerk Hagenah
 
Posts: n/a
Default Re: no permission, but I am root!

"Jeff" <goaway@spam.ignore> writes:

> I get the same results when running the date as non-root user.
> Make sure that the "root" user is indeed uid 0 with the id command.
> If you are then check permissions and what. Here is my output on a 10.20
> system that has no problems changing the date ..
>
> [/home/un410]$ date -u 0416144304
> date: do you really want to run time backwards?[yes/no]yes
> date: no permission
>
> [/home/un410]$ id
> uid=162(un410) gid=25(unix4)


# id
uid=0(root) gid=3(sys)

> [/home/un410]$ ll /usr/bin/date
> -r-xr-xr-x 1 bin bin 16384


There we are - permissions were

# ll /usr/bin/date
-r-sr-sr-x 1 bin bin 16384 Mar 23 1999
/usr/bin/date

and of course this can't work. Changing them back solved the
problem. Why are solutions usually simple once you found them? I do
feel kind of stupid now but then I probably deserve to...

>
> [/home/un410]$ what /usr/bin/date
> /usr/bin/date:
> $Revision: 76.1.1.1 $
> PATCH_10_20: date.o 99/03/23


Yep, that's exactly what I get too.

Well, I just wonder what made me change those permissions... Well I
probably wanted some user to change the date so he doesn't have to
call me all the time. I guess I'll write a shellscript.

Thanks a lot for helping!

Hinnerk
--
Dr.-Ing. Dipl.-Inf. H. Hagenah hg@lft.uni-erlangen.de
Lehrstuhl fuer Fertigungstechnologie FAU Erlangen

It is impossible to make anything foolproof, because fools are so
ingenious. Roger Berg
Reply With Quote