I'm trying to create a new user on a Centos 6 system.
First, I do
useradd kevin
Then, I tried to run commands as that user
su - kevin
However, I get the following error messages
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
[kevin@gazelle ~]$
And I can't do very much as that user.
The permissions on /dev/null
are as follows:
-rwxr-xr-x 1 root root 9 Jul 25 17:07 null
Roughly the same as they are on my Mac,
crw-rw-rw- 1 root wheel 3, 2 Jul 25 14:08 null
It's possible, but really unlikely, that I touched dev.
As the root user, I tried adding kevin
to the root
group:
usermod -a -G root kevin
However I still am getting /dev/null
permission denied errors.
Why can't the new user write to /dev/null
?
What groups should the new user be a part of?
Am I not impersonating the user correctly?
Is there a beginners guide to setting up users/permissions on Linux?
cat /dev/null
, does it look like something you recently used?