not able to login by the user interface

Opensuse 12.3.
my opensuse refuse to show the desktop after the login. at the login screen I enter my password and then the screen blank for a sec and the login re-appears. when I entered a wrong password the screen stays the same and add a line saying the login fails. so i don’y think is my password.
the last thing i was doing on my computer befores everythings becomes wrong was modefying the .bashrc to set a path to a program (adding cake to my system path) and this mornig I installed nginx server but I didn’t use it yet
I’am able to login via the terminal but there is a lot command that the terminal doesn’t recognize.

in the terminal, after I logged in, Linux greets me by “Have a lot of fun…” but I’m loosing my sense of humor
any help?

Hi
Press ctrl+alt+F1 and login as root user, then cd to your users home directory and;


mv .bashrc orig.bashrc
touch .bashrc

Then logout as root user and try logging in again as your user.

thks malcomlewis.

After I logged in as root, I am on the directory /root
I went to /HOME/GUINSLY and when I wrote

mv .bashrc orig.bashrc

result:

if ''mv'' is not a typo you can use command-not-found to lookup the package that contains it, like this cnf mv 

Hi
Sounds like the PATH variable is corrupted. OK, use the full path to mv and touch in the first instance to see if that helps;


/usr/bin/mv .bashrc orig.bashrc
/usr/bin/touch .bashrc

Can you also check your PATH environment variable


/usr/bin/echo $PATH

yes you right! I change the path while I was setting cakephp (pictures)

I remember that I add this line at the end of .bashrc. can I remove it via the terminal?

On Thu 17 Oct 2013 05:26:02 AM CDT, guinslym wrote:

malcolmlewis;2591697 Wrote:
> Hi
> Sounds like the PATH variable is corrupted. OK, use the full path to
> mv and touch in the first instance to see if that helps;
> >
Code:

> >
> /usr/bin/mv .bashrc orig.bashrc
> /usr/bin/touch .bashrc
>

> >
>
> Can you also check your PATH environment variable
> >
Code:

> >
> /usr/bin/echo $PATH
>

> >
yes you right! I change the path while I was setting cakephp
(‘pictures’
(https://www.dropbox.com/s/fuunkgykaoef7pl/IMG_20131016_221411.jpg?m))

I remember that I add this line at the end of .bashrc. can I remove it
via the terminal?

Hi
Yes with the vi command, but you should be in /home/<username>/
not /home.

I would suggest since it’s a PATH issue you can login/run vi as your
user, no need to be root.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 12.3 (x86_64) GNOME 3.8.4 Kernel 3.7.10-1.16-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Do you know the proper way to correct .bashrc

I am on /home/guinsly I wrote

 /usr/bin/vi .bashrc 

it then shows me a file but there is no $ Path variable on it.
And when I wrote “vi .bashrc” it doesn’t shows nothing cause it doesn’t recognize " vi"

I wrote this

/usr/bin/vi /home .bashrc

then its a blank file.

Well, you wrote in your first post that you modified .bashrc, so you should know, which one you edited and how, don’t you?
So edit it again, and undo your change (remove the last line?). Did you try this:

/usr/bin/vi /home/guinsly/.bashrc

?

Oh, and you have to logout and login again for that change to take effect.

And the next time you want to add something to the path, use something like this:

PATH=$PATH:/srv/www/htdocs/lynda/cakephp/lib/Cake/Console

not:

PATH=/srv/www/htdocs/lynda/cakephp/lib/Cake/Console

The latter one overwrites the system’s path.

On 2013-10-17 08:06, guinslym wrote:

> Code:
> --------------------
> /usr/bin/vi .bashrc
> --------------------
> it then shows me a file but there is no $ Path variable on it.

Path is not there. You probably changed the system path, because root
can not find things.

You have to undo what you did. Either we play guesses, or you remember
what you did.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Thks everybody! The problem is half resolve

I’ve found the file that I added this line

export PATH="/srv/www/htdocs/lynda/cakephp/lib/Cake/Console"

it’s in the

root/etc/.bash.bashrc

I remember I executed the file after I did add the last line.

Now I’m able to login and access the Desktop interface only with my username. In the desktop interface, in the terminal, when I want to use root I’m able to connect as root but root doesn’t recognize some commands like ls, vi etc…

What I have changed to be able to have my desktop.
Via the terminal I changed /home/guinsly/.bashrc to add

PATH=$PATH:/usr/bin

I have changed the chmod for 777 on the file and then I executed it

so rignt now I haven’t change the file root/etc/.bash.bashrc to delete the last line yet and I don’t know how or where to change the $PATH for the root user. Right now my echo $PATH looks like that:

/srv/www/htdocs/lynda/cakephp/lib/Cake/Console:/usr/bin

If I restart and logged in as root via the terminal and changed the **root/etc/.bash.bashrc **will I be able to recover my initial $PATH.

Why are you doing that, that’s not necessary. /usr/bin is added to the PATH by default. It’s just that your .bashrc line overwrites the whole PATH.
You should change that to say

export PATH=$PATH:/srv/www/htdocs/lynda/cakephp/lib/Cake/Console

as I already wrote.

If I restart and logged in as root via the terminal and changed the **root/etc/.bash.bashrc **will I be able to recover my initial $PATH.

Which file is this exactly now? Is it /etc/.bash.bashrc or /root/etc/.bash.bashrc or something else?
I guess it’s something else because those two files wouldn’t get used at all… :wink:

But if you haven’t changed anything else, yes you should have your initial $PATH back after changing that again.

On 2013-10-18 04:26, guinslym wrote:

> Thks everybody! The problem is half resolve
>
> I’ve found the file that I added this line
>
> Code:
> --------------------
> export PATH="/srv/www/htdocs/lynda/cakephp/lib/Cake/Console"
> --------------------
>
> it’s in the
> Code:
> --------------------
> root/etc/.bash.bashrc
> --------------------

That file does not exist. Not the way you have written it, at least.

Maybe you refer to


/etc/bash.bashrc

No word ‘root’, and not dot.

What I have changed to be able to have my desktop.
Via the terminal I changed /home/guinsly/.bashrc to add
Code:

PATH=$PATH:/usr/bin

This is not needed, because the system path already contains “/usr/bin”.
Yours doesn’t because you have destroyed it, somehow.

The system path is defined in “/etc/profile”, with a code like this:


if test -z "$PROFILEREAD" ; then
PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin
for dir in $HOME/bin/$CPU $HOME/bin ; do
test -d $dir && PATH=$dir:$PATH
done
test "$UID" = 0 && PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH
for dir in  /var/lib/dosemu \
/usr/games \
/opt/bin \
/opt/gnome2/bin \
/opt/gnome/bin \
/opt/kde3/bin \
/opt/kde2/bin \
/opt/kde/bin \
/usr/openwin/bin \
/opt/cross/bin
do
test -d $dir && PATH=$PATH:$dir
done
unset dir
export PATH
fi

Now, What have you done that this does not work?


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)