LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-23-2010, 07:51 AM   #1
vivkepat
LQ Newbie
 
Registered: May 2010
Posts: 14

Rep: Reputation: 0
user login issue


Hi im trying to logon by creating a user
i am getting error
Last login: Wed Aug 18 05:07:47 2010 from 172.18.17.171
-bash: /etc/profile: line 62: syntax error: unexpected end of file
[root@java ~]# su oracle
su: /bin/bash: Permission denied




i have also checked /etc/passwd
oracle:x:503:504::/home/oracle:/bin/bash


kindly help
 
Old 09-23-2010, 07:53 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Did you check log files? What does the /etc/profile contain?
 
Old 09-24-2010, 12:40 AM   #3
vivkepat
LQ Newbie
 
Registered: May 2010
Posts: 14

Original Poster
Rep: Reputation: 0
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|$1($|" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
EUID=`id -u`
UID=`id -ru`
fi
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
if [ -x /usr/bin/id ]; then
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
unset i
unset pathmunge
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
 
Old 09-24-2010, 01:25 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,258

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
Using code tags would have made it easier to read, but in any case
Code:
if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
you're missing a final 'fi' at the end there...
 
Old 09-24-2010, 01:30 AM   #5
vivkepat
LQ Newbie
 
Registered: May 2010
Posts: 14

Original Poster
Rep: Reputation: 0
I have added fi at the end still i am facing the same issue


tail -f /var/log/secure

Aug 24 22:54:51 java sshd[19594]: Accepted password for oracle from 172.18.17.171 port 50195 ssh2
Aug 24 22:54:51 java sshd[19594]: pam_unix(sshd:session): session opened for user oracle by (uid=0)
Aug 24 22:54:51 java sshd[19594]: pam_unix(sshd:session): session closed for user oracle
 
Old 09-25-2010, 12:33 AM   #6
vivkepat
LQ Newbie
 
Registered: May 2010
Posts: 14

Original Poster
Rep: Reputation: 0
solution resolves
chmod 755 bin


cheers!!!!!
 
Old 09-25-2010, 01:21 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Great. Mark the thread as solved. Helps others with similar issues.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue during the User Login?? ajeetraina Linux - Newbie 1 12-05-2007 06:43 AM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 04:44 AM
Crazy blank dialog boxes and windows at login. Can't login as user soren625 Linux - General 2 08-11-2004 07:30 AM
Samba issue. Sometimes cannot login by using correct user/password. olegarr Linux - Networking 3 10-30-2003 10:17 PM
how to issue a message prior to login prompt for a particular user mtest Programming 19 10-30-2003 07:41 AM


All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration