LinuxQuestions.org
Help answer threads with 0 replies.
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 01-20-2005, 07:34 PM   #1
Kanon
Member
 
Registered: Sep 2004
Location: Norge
Distribution: Debian
Posts: 116

Rep: Reputation: 15
bash: /etc/profile: Permission denied


I have had a minor pain today with login in to my server as a regular user. At first the PuTTY window closed as soon as I typed in my pw.

Figured that out after reading small hints here and there....: Change "UseLogin yes" (it was no) in "sshd_config"

Then when I did manage to get in I got this:

bash: /etc/profile: Permission denied

If I su <user> I also noticed that my user name (as the first part of the prompt) was: "I have no name"

Reading again.... The solution for me was to: chmod 755 /etc

So Im post this coz I see alot of pll have the same problem. And maybe this can help or give some pointers.

Edit: It should be 755 on /etc and not 744 as I posted at first.

Last edited by Kanon; 01-21-2005 at 08:01 AM.
 
Old 01-20-2005, 07:36 PM   #2
Kanon
Member
 
Registered: Sep 2004
Location: Norge
Distribution: Debian
Posts: 116

Original Poster
Rep: Reputation: 15
I can add that in my auth.log I found this:

"fatal: login_get_lastlog: Cannot find account for uid"
 
Old 01-20-2005, 08:39 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Chmoding /etc to 744 will give it drwxr--r-- permissions, i.e. nobody but root will be able to cd into /etc. That's not good. The permissions need to be 0755 on /etc. Probably login cannot read the passwd file and this is causing all your problems.
 
Old 01-20-2005, 08:49 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
Sounds to me that you didn't use the correct user name when logging in or using the su command. UID stands for User ID, which is an integer that the system associates with a user.
 
Old 01-21-2005, 08:01 AM   #5
Kanon
Member
 
Registered: Sep 2004
Location: Norge
Distribution: Debian
Posts: 116

Original Poster
Rep: Reputation: 15
Im not asking here. Im stating my solution to a problem I had.
When I was searching to the solution I saw that I was not to only one with this problem, and since all the infor needed to fix it was allower the place I thought this might be a good thing to post here.

And your right, it should be 755 on /etc
 
  


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
su: /bin/bash: Permission denied dwarf007 Linux - General 10 01-20-2006 04:32 PM
bash: ./bootstrap: Permission denied jimi2012 Linux - Software 2 10-11-2005 11:42 AM
bash: /etc/profile: Permission denied Zero-0-Effect Linux - General 3 03-28-2005 04:47 AM
bash: /etc/profile: Permission denied madmax Linux - General 15 07-20-2003 06:56 AM
RH7.2 bash: permission denied Korshun Linux - Distributions 3 04-29-2002 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:11 PM.

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
Open Source Consulting | Domain Registration