From: Ricardo Pincheira (pinch@cs.washington.edu)
Date: 03/07/93


From: pinch@cs.washington.edu (Ricardo Pincheira)
Subject: permission problems with non-root users
Date: Sun, 7 Mar 1993 07:56:49 GMT

Fellow linuxers,

I'm another of the many people who have been having problems with
accounts for users other than root. I just can't figure
it out from info in postings and the FAQ. Perhaps you can help -- the
feeling of power that comes from being "root" all the time fades
after a while :-). Seems like all I have to do is change permissions
of some file but I just can't figure it out.

This is with the brand new 99p6 release which I've pretty much been
able to install successfully (eg, X /twm is running, on my
little AST laptop :-))))) ). I haven't really used linux before,
except briefly with series a-b of 99p2 and then I heard of 99p6 so
started afresh.

The problems I have relate to permissions. Here's what happens.
If I log in as non-root (I'll describe how I gave myself an account
later) I get, if I use bash:
         As I log in, I get:
         shell-init: permission denied.
         pwd: permission denied.
         : permision denied

         After that things pretty much work (eg, I can edit and
         write out a file from vi) , except that I get a whole
         bunch of permission denied messages for every command
         I issue.

And if I use tcsh as my login shell (with chsh from root) and login
as non-root:
         Last login: Sat Mar 6 10:31:54 on tty2
         You have mail.
         tcsh: Permission denied
         tcsh: Trying to start from "/local/users/pinch"
         shell-init: Permission denied
         (then I get the prompt)

         After that things work, w/o even silly "permission denied"
         messages. But if I try to run a shellscript with tcsh as
         the shell, I get (the shellscript is called pinchrm)
         tcsh: Permission denied
         tcsh: Trying to start from "/local/users/pinch"
         pinchrm: No such file or directory.

         Things work fine if I su to root.

Where oh where did I mess up? It looks like all I have to do is
reset the permissin of some file or other that is getting accessed
from the shell, but which??
I have tried finding the answer at the "unix system administration"
book by (oh, I forgot who!), to no avail.

In case it helps, here's the entries in my /etc/shadow:

        daemon:*:8365:0:99999:7:::
        bin:*:8365:0:99999:7:::
        adm:*:8365:0:99999:7:::
        pinch:SvQR.EZMawfts:8462:0:90:0:::0

and in /etc/passwd
        root::0:0::/root:/usr/bin/tcsh
        daemon:x:1:1::/etc:
        bin:x:2:2::/bin:
        adm:x:4:4::/:
        uucp::5:5::/usr/uucp:
        sync::255:0:::/bin/sync
        anonymous:*:403:1::/home/ftp:/bin/sh
        ftp:*:404:1::/home/ftp:/bin/sh
        pinch:*:405:6:Ricardo Pincheira,Sieg 429,543-5129,367-9369:/local/users/pinch:/usr/bin/tcsh
            99p6:
there was some postings about getting rid of some of the 0's in /etc/shadow
but I tried all sorts of changes w/o success.

To set this up I used
            useradd -A DEFAULT -g 6 -s /usr/bin/tcsh -d/local/users/pinch -f -1 -e 9999999
            -m pinch
             passwd pinch
                 (gave myself a passwd)
             chown --r pinch /local/users/pinch
             chgrp --recursive 6 /local/users/pinch
             chfn pinch (to change finger information)

I also tried the technique outlined in the FAQ to add accounts to no
avail (after userdel'ing the account. I tried this many times). I also
tried adding to /etc/rc.local file the line "rm -f /etc/nologin" as
suggested by the FAQ. To no avail.

Incidentally, in reference to earlier postings along a similar line,
I should say that non-root users have no problem changing their passwd.

Many thanks for any help.

Ricardo
pinch@cs.washington.edu

-- 
Ricardo
pinch@cs.washington.edu                 -- Just doodoo it