Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
users and groups
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Fri Jul 22, 2005 10:54 am    Post subject: users and groups Reply with quote

1. i need the user to have an ability to portage, what group do i need then?
2. do i have to list all these groups when i add new user (if i i'd like to have them): audio, cdrom, floppy, games, usb, video, wheel?
3. how to add some groups under root to existing user?
4. how to find out all the groups available on my box?
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Fri Jul 22, 2005 11:04 am    Post subject: Reply with quote

1: You need to be part of the portage group, but if you want to be able to actually install programs as normal user then you should take a look at sudo.
2: Yes, although you can also do it later (see 3). Remeber not to put spaces between the groups. (wheel,audio is correct. wheel, audio is wrong)
3: gpasswd -a user group
4: cat /etc/group
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Fri Jul 22, 2005 11:21 am    Post subject: Reply with quote

BlackEdder wrote:
1: You need to be part of the portage group, but if you want to be able to actually install programs as normal user then you should take a look at sudo.
2: Yes, although you can also do it later (see 3). Remeber not to put spaces between the groups. (wheel,audio is correct. wheel, audio is wrong)
3: gpasswd -a user group
4: cat /etc/group


thanx!

where can i find this sudo?
can i use # usermod -G <group> <username>?
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Fri Jul 22, 2005 11:28 am    Post subject: Reply with quote

The problem with usermod -G is that you will also need to add all old groups ->
joe is member of video,audio,wheel. You want to add him to portage you need to do
Code:
usermod -G video,audio,wheel,portage joe

or
Code:
gpasswd -a joe portage


You can emerge sudo and read the manpage
Code:
man sudo
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Fri Jul 22, 2005 11:38 am    Post subject: Reply with quote

BlackEdder wrote:
The problem with usermod -G is that you will also need to add all old groups ->
joe is member of video,audio,wheel. You want to add him to portage you need to do
Code:
usermod -G video,audio,wheel,portage joe

or
Code:
gpasswd -a joe portage


You can emerge sudo and read the manpage
Code:
man sudo


awesome!!!

if i can emerge stuff under root, why do i need sudo then?
if i emerged something under root, could i grant it to certain user somehow?
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Fri Jul 22, 2005 12:35 pm    Post subject: Reply with quote

i was working on Gentoo before and i could install software under regular user.
maybe sudo was installed and configured and i didn't know about that?
Back to top
View user's profile Send private message
F-0_ICE
l33t
l33t


Joined: 06 Dec 2004
Posts: 679

PostPosted: Wed Jul 27, 2005 1:39 pm    Post subject: Reply with quote

i am also looking for the same thing. i want to be able to use emerge as a normal user but of course adding me user to the portage group does nothing. i have head about sudo in an old handbook but never tried using it. but at any rate i might be able to figure out how to configure sudo but i need to make sure i use the right package. i am pretty positive i am looking in the right direction with app-admin/sudo but there is also app-vim/sudo just want to make sure i use the right one :wink:
_________________
~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G

True Knowledge is Best Acquired Through Experience.
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Wed Jul 27, 2005 1:45 pm    Post subject: Reply with quote

app-admin/sudo

When you have configured sudo you will have to use sudo emerge to emerge stuff. Alternatively you could put an alias for emerge in your ~/.bashrc
Code:
alias emerge="sudo emerge"
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Wed Jul 27, 2005 3:05 pm    Post subject: Reply with quote

BlackEdder wrote:
app-admin/sudo

When you have configured sudo you will have to use sudo emerge to emerge stuff. Alternatively you could put an alias for emerge in your ~/.bashrc
Code:
alias emerge="sudo emerge"


and when the alias is created, you could just run # emerge [...], isn't it?
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Wed Jul 27, 2005 3:17 pm    Post subject: Reply with quote

Yep... after you logged in and out once or sourced the .bashrc file
Code:
source ~/.bashrc
Back to top
View user's profile Send private message
romalong
Guru
Guru


Joined: 08 Jun 2005
Posts: 488
Location: Kiev

PostPosted: Wed Jul 27, 2005 3:36 pm    Post subject: Reply with quote

BlackEdder wrote:
Yep... after you logged in and out once or sourced the .bashrc file
Code:
source ~/.bashrc


cool!
Back to top
View user's profile Send private message
F-0_ICE
l33t
l33t


Joined: 06 Dec 2004
Posts: 679

PostPosted: Wed Jul 27, 2005 8:00 pm    Post subject: Reply with quote

things work well with me i can use emerge with me user thanks 4 helping
_________________
~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G

True Knowledge is Best Acquired Through Experience.
Back to top
View user's profile Send private message
F-0_ICE
l33t
l33t


Joined: 06 Dec 2004
Posts: 679

PostPosted: Thu Jul 28, 2005 11:59 am    Post subject: Reply with quote

looks like i spoke too soon it doesn't display the message about the portage group but it just says root access required.
what 2 do?
_________________
~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G

True Knowledge is Best Acquired Through Experience.
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Thu Jul 28, 2005 12:50 pm    Post subject: Reply with quote

Does it work again after you source ~/.bashrc?
Back to top
View user's profile Send private message
F-0_ICE
l33t
l33t


Joined: 06 Dec 2004
Posts: 679

PostPosted: Thu Jul 28, 2005 1:07 pm    Post subject: Reply with quote

nope but i can run
Code:
emerge -p <package>
without problems.
when i first tried that i assumed i could emerge stuff bad idea :oops:
_________________
~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G

True Knowledge is Best Acquired Through Experience.


Last edited by F-0_ICE on Thu Jul 28, 2005 1:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Thu Jul 28, 2005 1:12 pm    Post subject: Reply with quote

Yeah -p works since you are part of the portage group. What happens if you do
Code:
sudo emerge package
Back to top
View user's profile Send private message
F-0_ICE
l33t
l33t


Joined: 06 Dec 2004
Posts: 679

PostPosted: Thu Jul 28, 2005 1:15 pm    Post subject: Reply with quote

it asks 4 passwd and says that i need to be in the 'sudoers' file i have read the man pages but they are confusing.
_________________
~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G

True Knowledge is Best Acquired Through Experience.
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Thu Jul 28, 2005 1:19 pm    Post subject: Reply with quote

Try this howto, step 5:
http://www.unixcities.com/sudo/

Manpages are often confusing at first you will come to learn how to read them though :)
Back to top
View user's profile Send private message
F-0_ICE
l33t
l33t


Joined: 06 Dec 2004
Posts: 679

PostPosted: Thu Jul 28, 2005 1:31 pm    Post subject: Reply with quote

i can use
Code:
sudo emerge <package>
and i edited ~/.bashrc so now ican just emerge a package. thanks 4 helping
_________________
~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G

True Knowledge is Best Acquired Through Experience.
Back to top
View user's profile Send private message
F-0_ICE
l33t
l33t


Joined: 06 Dec 2004
Posts: 679

PostPosted: Sun Jul 31, 2005 2:14 am    Post subject: Reply with quote

i have a problem again when i run emerge it get this now
Code:

sudo: /etc/sudoers is mode 0775, should be 0440

_________________
~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G

True Knowledge is Best Acquired Through Experience.
Back to top
View user's profile Send private message
Cinder6
l33t
l33t


Joined: 05 Aug 2004
Posts: 767
Location: California

PostPosted: Sun Jul 31, 2005 6:36 am    Post subject: Reply with quote

Here is how I got my user to use portage. First, I installed sudo and visudo. Then I added this to the sudoers file (via visudo):
Code:
%emerge ALL=(root) NOPASSWD: /usr/bin/emerge

Then:
Code:
groupadd emerge
gpasswd -a jared emerge

Hope that helps!
_________________
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Back to top
View user's profile Send private message
F-0_ICE
l33t
l33t


Joined: 06 Dec 2004
Posts: 679

PostPosted: Sun Jul 31, 2005 10:45 am    Post subject: Reply with quote

thanks that worked out great :)
_________________
~AMD64
AMD: Athlon64 X2 3800+
2G PC3200
ATI: RADEON HD 4350
Linksys: WMP54G

True Knowledge is Best Acquired Through Experience.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum