You are not logged in.

#1 2008-12-14 22:25:47

vikkevest
Member
Registered: 2008-12-12
Posts: 8

[Solved]Username dissappear when add to sudoers

Hello I recently installed arch and this has happened every time I tried installing. When I add my user to the sudoers file the

command prompt change from user_name@hostname: to the name of the terminal im using so now my prompt is bash-3.2

How do I change it back?

Last edited by vikkevest (2008-12-17 07:00:32)

Offline

#2 2008-12-14 22:58:21

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: [Solved]Username dissappear when add to sudoers

What are you putting the sudoers file? How are you executing sudo?


Website - Blog - arch-home
Arch User since March 2005

Offline

#3 2008-12-14 23:19:58

vikkevest
Member
Registered: 2008-12-12
Posts: 8

Re: [Solved]Username dissappear when add to sudoers

I added my user to a group called masters. So I added this line to sudoers:

%masters ALL=(ALL) ALL

Think thats the correct syntax. However sudo works fine, its just the irritating detail that the prompt changes.

I have simply used sudo so for to execute installation of packages

sudo pacman -S firefox

Last edited by vikkevest (2008-12-14 23:26:48)

Offline

#4 2008-12-14 23:23:45

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: [Solved]Username dissappear when add to sudoers

Well PS1 gets set in .bashrc. I am guessing that root doesn't have a .bashrc file.

How are you executing sudo?
sudo mycoolprogram or sudo -i, etc....


Website - Blog - arch-home
Arch User since March 2005

Offline

#5 2008-12-14 23:32:55

vikkevest
Member
Registered: 2008-12-12
Posts: 8

Re: [Solved]Username dissappear when add to sudoers

Edited my first post to answer that question, not sure what PS1 is, but if it has anything to do with setting the prompt it could be the problem. My newly created user didnt have any .bashrc file (if I was looking in the right place), not sure where the .bashrc conf file is located for the root acc.

Offline

#6 2008-12-14 23:46:51

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: [Solved]Username dissappear when add to sudoers

Well your bashrc file should be located at ~/.bashrc

Do you have a file, if so what is in the file?


Website - Blog - arch-home
Arch User since March 2005

Offline

#7 2008-12-16 12:53:55

vikkevest
Member
Registered: 2008-12-12
Posts: 8

Re: [Solved]Username dissappear when add to sudoers

This can be marked as solved. I think it has something to do with the .bashrc or any bash config file. I tried copying my .bashrc and .profile config files from my kubuntu installation to my home folder and then the prompt was restored. Not sure if this is a good solution? Is the anyway to autogenerate new bash config files because they arent created when I create a new user.

Another thing, the historyfunction doesent work in the terminal (press up for previous executed command) in KDE. It works in textbased mode but not in terminals opened in the KDE environment.

Offline

#8 2008-12-16 13:00:05

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: [Solved]Username dissappear when add to sudoers

Do your any of your arrow keys work?


Website - Blog - arch-home
Arch User since March 2005

Offline

#9 2008-12-16 13:06:40

string
Member
Registered: 2008-11-03
Posts: 286

Re: [Solved]Username dissappear when add to sudoers

Check out /etc/skel

Offline

#10 2008-12-16 14:38:46

vikkevest
Member
Registered: 2008-12-12
Posts: 8

Re: [Solved]Username dissappear when add to sudoers

Okay thanks for the help. The problem is not that history doesent work (sorry). In fact none of the arrow keys work, the keyboard layout is kind of weird.

When I try to set keyboard shortcuts (in kde) it interpret the keys like following (just a few examples):

uparrow = Print
leftarrow = ISO_Level3_shift
downarrow = Win

print = Delete
end = Win

I have a Saitek II keyboard with swedish qwerty layout. I have set the keyboard layout in the KDE layout manager to swedish. Swedish special characters work, its just that these keys are fubar.

Offline

#11 2008-12-16 15:33:02

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: [Solved]Username dissappear when add to sudoers


Website - Blog - arch-home
Arch User since March 2005

Offline

#12 2008-12-16 21:01:49

vikkevest
Member
Registered: 2008-12-12
Posts: 8

Re: [Solved]Username dissappear when add to sudoers

Yay! changing the keyboard model to: Evdev-managed keyboard did the trick!

Thanks for your help and patience with a newbie! This can be marked as solved I guess.

Offline

#13 2008-12-17 00:16:45

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: [Solved]Username dissappear when add to sudoers

No problem!

Just edit your first post, and add [Solved] in front of the title.


Website - Blog - arch-home
Arch User since March 2005

Offline

Board footer

Powered by FluxBB