> Script started on Wed Aug 30 11:48:54 2000
> # cat etc/passwd
> root:xxxx:0:0::/:/bin/sh
> mary:mmmm:0:0::/:/mary

Problem #1, you have mary's shell set to /mary.  Maybe you meant:

        mary:mmmm:0:0::/mary:/bin/sh

Which sets her home directory to mary and her shell to /bin/sh.

Problem #2, you have the entry making her root (uid = 0) anyway,
maybe you meant:

        mary:mmmm:100:0::/mary:/bin/sh

> I do'nt understand the login mechanism of rtbt. Why I cann't login? Also

Problem #2, see /bin/login.  It is a shell script, you can just view it.

Problem #3, /bin/login cannot in fact change the current user.

As noted in the file tomsrtbt.FAQ circa line 232 in the current version:

 ***********************************************************************
 *       If you need to not be root, use a suid shell.  Login won't do it.  *
 ***********************************************************************

For what YOU want, you need to do something like:

        mary:mmmm:100:0::/mary:/bin/marysh

and, in rc.custom:

        cp -vaf /bin/sh /tmp/marysh
        chown mary /tmp/marysh
        chmod u+s /tmp/marysh
        ln -s -f /tmp/marysh /bin/marysh

What this will do is create a shell that is suid mary, that is, when you
invoke THAT shell, you will become mary.

Of course, you don't have to log in as mary at the login prompt, you 
have to make the passwd file change, but then you can just invoke
marysh to change your userid to mary.

-Tom

Reply via email to