LinuxQuestions.org
Visit Jeremy's Blog.
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 10-31-2007, 10:34 AM   #1
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
.bash_profile: Permission denied


Good Day,

.bash_profile: Permission denied
Why is it.

I have exact same installation on other boxes, and I have no problem loging-in in.
I use sudo to log in.

Thanks.
 
Old 10-31-2007, 10:56 AM   #2
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Um you don't want to log in as sudo, you sould have a user account name to log in under. Then if you need to do anything that need root privilages you would prefix the command with sudo, then you would be prompt for a passwd.
 
Old 10-31-2007, 12:49 PM   #3
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
'sudo' - is not a login! As mrrangrman mentioned, it allows you executing root commands without being a root (albeit, you need to set right permissions in 'sudoers' file as a root). If your login is correct then it has to bring you into your home directory, and you would have all access rights.
 
Old 10-31-2007, 01:10 PM   #4
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
I am so sorry for not giving you complete information.

#sudo su usr-name
/home/usr-name/.bash_profile: Permission denied

Thats what happens.

Thanks.
 
Old 10-31-2007, 01:42 PM   #5
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
Just do:
#su usr-name
That will prompt you for password, and after you login you could do anything with ~/.bash-profile.

The other alternative is logining as a root, but being a root is not a good idea in general.
 
Old 10-31-2007, 01:54 PM   #6
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Quote:
#sudo su usr-name
/home/usr-name/.bash_profile: Permission denied
First, are you logged in as a normal user and trying to switch into a root account?

If that is the case then the command would be su <enter> then you will be prompt for the root password.

I guess I should have started here, what Distro are you using?

If you are using one of the Ubuntu's K X then by default you are not set up with a root account. Like I said in above post you will log in as usr/name and any work needing root privileges the command will be started with sudo.
Now if you have set up a root account and you are trying to switch user into root then you don't need to give the sudo command. The command would be like so su <enter> you will be asked for a root password, enter the root password and you will be root.

Or if you have more than one user account setup on your system, then to log into or switch user into that account the command would be su usr/name then give the password for that user.

Or maybe I'm just not getting what your trying to do.
 
Old 10-31-2007, 02:05 PM   #7
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542

Rep: Reputation: 33
Have you done a ls -l to see who owns the .bash_profile file?
 
Old 10-31-2007, 02:34 PM   #8
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
stone#su usr-name
pwd

/home/usr-name/.bashrc permission denied.

usr-name#cd /home/usr-name
permission denied

note: ls -l comes back with
755 usr-name usr-group /home/usr-name
 
  


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
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 05:57 AM
Permission Denied gearhead364 Linux - Newbie 5 01-28-2007 12:01 AM
Permission Denied PacMansRancor Linux - Newbie 3 09-29-2005 04:45 PM
Permission Denied jamesvenning1 Linux - Newbie 4 06-05-2005 11:32 AM


All times are GMT -5. The time now is 03:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration