Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New user in RHEL3 1

Status
Not open for further replies.

felix001

Technical User
Nov 15, 2008
102
GB
I created a new user in RHEL3 and when they log in i get

-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied

I think i haven't set them up with the relevant permissions....

Whats the standard chain of events i need to go through for when creating a new user...


 
# This creates "kerry" using bash as shell and /home/kerry for home directory

linux4 :root: [1797]-> useradd -s /bin/bash -d /home/kerry kerry

# This creates "kerry" using ksh as shell and /home/kerry for home directory

linux4 :root: [1798]-> useradd -s /bin/ksh -d /home/kerry kerry
linux4 :root: [1799]-> passwd kerry


A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
Ive tried the above but am still getting the same error when i log in ???
 
what if you try login from root "su yourlogin_name"

"su kerry" (should not prompt for password), authenticate
and see if you can "cd /home/kerry;ls -al" see if support files for bash (profiles) are in place, etc.

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
Yep all the files under there home dir are there,

[ajeet@localhost ~]$ ls -lha
total 24K
drwx------ 2 ajeet ajeet 4.0K Apr 15 22:06 .
drwxr-xr-x 8 root root 4.0K Apr 15 22:06 ..
-rw-r--r-- 1 ajeet ajeet 33 Apr 15 22:06 .bash_logout
-rw-r--r-- 1 ajeet ajeet 176 Apr 15 22:06 .bash_profile
-rw-r--r-- 1 ajeet ajeet 124 Apr 15 22:06 .bashrc

Im wondering if I need to enter them into a group or something...

Also what is the recommended way to give them access to certain binaries such as ssh,

[ajeet@localhost ~]$ ssh root@192.168.2.101
Couldn't open /dev/null: Permission denied[ajeet@localhost ~]$
 
paste output from these two commands
grep ajeet /etc/passwd
grep ajeet /etc/group

now try "su - ajeet"

The "-" uses the environment from the .bash_profile in the user's home directory.

access to programs is done via PATH=/bin:/sbin:/usr/bin in the .bash_profile

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
Your error is "Permission denied" on "[tt]/dev/null[/tt]". Please post the output of the following...
Code:
ls -l /dev/null
It should be a character special device with read+write permission for everybody. Something like this...
Code:
[b]crw-rw-rw-[/b]    1 root     root       1,   3 Jun 24  2004 /dev/null


 
Thanks guys, this was the info I was looking for...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top