From: Randy Edwards (Randy.Edwards@f60.n128.z1.fidonet.org)
Date: 01/24/93


From: Randy.Edwards@f60.n128.z1.fidonet.org (Randy Edwards)
Subject: 2 Linux ques. (read faq:
Date: Sun, 24 Jan 1993 19:39:00 -0800


   I'm a Linux newbie who has poured through a couple of books on Un*x
during the last couple of weeks, and is now making my way through
_Managing UUCP..._. Anyway, a couple of odd things have been bothering

me about Linux (I'm using the most recent SLS version).
 
   First, is the useradd command. I've got my /etc/skel directory all
set up, and everything looks good. I can run useradd successfully and
it'll create the new user's home directory, copy in the /etc/skel files

-- and everything looks great: except the password. When I try to log
in as the new user I created, it's a no-go. No password will work. If,

as root, I change the user's password, and then try to log in as that
user, I still can't.
 
   So, for the time being, I've made users "manually" by editting
/etc/passwd, and setting up their directory, permissions, etc., by hand

-- this works fine but is a lot of work. Does anyone have any idea what

I might be doing wrong with the useradd command? I'm about ready to
'rm' it and work up some scripts to do it all semi-manually...
 
   My second question is about file permissions and general file
access.

As root, I made a dummy file named 'test.fil' with an owner and group
of 'root' and permissions of -rw-r--r--. Then, I logged in as a normal

user and tried to rm the file. I get a 'permission denied' response,
and the file remains intact. Great. Then, I immediately change
directories to /etc and do a 'rm passwd'. To my surprise, I get a
response of 'rm: remove 'passwd', overriding mode 0600?' So I type 'y'

and the system deletes my password file. The password file was also
owned by and in group 'root' and had permissions of -rw-------. What
boggles me is why does the system allow me to delete one file, but not
the other? (Remember, I did this logged in as a user, not as root.).
To me, since I don't know what's going on, this gives me shudders and
fears of system security. Can someone clue me in on what's happening
here (and how I might prevent it)?
 
Thanks in advance,
.
Randy
 
... OFFLINE 1.50 "America works best when we say, 'Union YES!'"

 * Origin: The Programmers Playhouse (1:128/60)