home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!doc.ic.ac.uk!uknet!comlab.ox.ac.uk!mbeattie
- From: mbeattie@black.ox.ac.uk (Malcolm Beattie)
- Newsgroups: comp.os.linux
- Subject: Re: Can't run shell! (SLS) I'm loosing my hair!
- Message-ID: <1992Nov6.174043.2493@black.ox.ac.uk>
- Date: 6 Nov 92 17:40:43 GMT
- Organization: Oxford University Computing Service, 13 Banbury Rd, Oxford, U
- Lines: 63
- Originator: mbeattie@black
-
- In article <1992Nov6.071803.15471@ugle.unit.no> hallvard@immhp1.marina.unit.no (Hallvard Paulsen) writes:
- >
- >
- > This is driving me crazy!
- >
- > I've got the SLS package (including the z?fix.taz files), and
- >there is now way I can do anything as a user. Well actually the errors I
- >get is:
- >
- > shell-init:permission denied (when I log in)
- > pwd : permission denied (every time i type a command)
- >
- > But when I check it turns out that my commands (like creating files
- >deleting files and so on) are usually executed. The problem seems to
- >be shell commands *only*. (that is since PS1="pwd"# I always get a
- >permission denied message)
- >
- > So: How do I make the shell usable for users?
-
- This sort of problem occurs when a user's home directory has its
- permissions set incorrectly, for example if the directory is not
- owned by the user and the permissions are rwx--x--x.
- Just before the shell gives its prompt, it may try to
- stat and read the current working directory, e.g. to put things
- in its prompt text. This causes errors such as you describe.
-
- When you create a user, bloggs say, make sure after you create
- the home directory that you
- # chown bloggs ~bloggs
- (or chown bloggs.users ~bloggs or whatever) and then twiddle the
- permissions if you don't like them.
-
- Notice that the problem would show up under most Unices only
- if the user *did* have execute permission but did *not* have
- read permission, because without execute permission, login
- realises in time and says something like
- No home directory! logging in with home=/
- and puts you in the root directory. Does anyone know if the login
- that Linux (in particular, SLS) uses perhaps does the chdir
- *before* changing uid to the user and without checks? In that
- case, the above problem may show up even if the user's home
- directory was rwx------ and not owned by the user?
-
- --Malcolm
-
- >
- >
- > \\___//
- > | | Hallvard Paulsen, MSc
- > |_____| Research Engineer / Grad. Stud
- > || o || Division of Machinery
- > || \\|| NORWEGIAN MARINE TECHNOLOGY RESEARCH INSTITUTE
- > \\ TEL : +47 (07)595522
- > o FAX : +47 (07)595983
- > // EMAIL : hallvard.paulsen@imm.unit.no
- > O
-
-
- --
- Malcolm Beattie <mbeattie@black.ox.ac.uk> | I'm not a kernel hacker
- Oxford University Computing Services | I'm a kernel hacker's mate
- 13 Banbury Road, Oxford, OX2 6NN (U.K.) | And I'm only hacking kernels
- Tel: +44 865 273232 Fax: +44 865 273275 | 'Cos the kernel hacker's late
-