Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
adding user account to ALL groups quickly ? how ? [ANSWERD]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
InsaneHamster
Guru
Guru


Joined: 02 May 2003
Posts: 435

PostPosted: Fri Jan 13, 2006 11:11 pm    Post subject: adding user account to ALL groups quickly ? how ? [ANSWERD] Reply with quote

i wana add a 'user' account to all the groups instead of adding him one by one. and like checking what groups he is part of and such. what is good documentation on user accounts .

thanks

is it safe for me as in r00t to just edit my /etc/group file and just add my 'user' to the end of them all
should include this account (which will be my main account) in the root group also ?


Last edited by InsaneHamster on Sat Jan 14, 2006 2:58 am; edited 1 time in total
Back to top
View user's profile Send private message
JRV
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 291

PostPosted: Fri Jan 13, 2006 11:58 pm    Post subject: Re: adding user account to ALL groups quickly ? how ? Reply with quote

InsaneHamster wrote:
is it safe for me as in r00t to just edit my /etc/group file and just add my 'user' to the end of them all


Why would you ever want a user to be part of _every_ group? Of course it is possible to do this by simply editing the /etc/group file, but you shouldn't grant a user more priviledges than needed! Adding him to "audio", "games", etc. is ok, of course, if he needs the applications that these groups refer to, but most of the other system groups should be off-limits for any normal user!

JRV


Last edited by JRV on Fri Jan 13, 2006 11:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Fri Jan 13, 2006 11:58 pm    Post subject: Reply with quote

Adding a user to all groups probably isn't a good idea and undermines the security features of linux, but if you want
Code:
for name in `cut -d ':' -f 1 /etc/group` ; do gpasswd -a username $name ; done

Replace username with the name of user you are adding.

Edit: The groups command run as any user will show the groups that user is in.

You can edit /etc/group as root, but you will have to re-login for the changes to be seen. (There are other ways, but this is best for noobies)
Back to top
View user's profile Send private message
InsaneHamster
Guru
Guru


Joined: 02 May 2003
Posts: 435

PostPosted: Sat Jan 14, 2006 12:30 am    Post subject: ok Reply with quote

well until now iv always ran my box as root. but i plan on using a apache2 and my sql + logs and firewalls and running a hardned system this time around. i added the groups i only needed but some programs didnt work and no error was given that is why i assumed the easiest way to solve this was to make the main account which will be loggin in 24/7 to be allowed acess to everything

(eterm wouldnt support transparencies via a user account ??!?!?!? )

and such other little things. i got sudo to work properly n such.

if there are any documents you recommend i read feel free to post them as i am just learning how to harden my system for network server applications. via running servers and proper network administration of them.

see i need to know how to properly setup a user account (which i was gona give full access to) then so i can add system logs and readers (if u can name some 'industrial' ones used i could test it would be appreciated) and from there learn how to network administrator the system from a user account and such. before moving on.
Back to top
View user's profile Send private message
JRV
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 291

PostPosted: Sat Jan 14, 2006 1:01 am    Post subject: Re: ok Reply with quote

InsaneHamster wrote:
well until now iv always ran my box as root.


:(!!!

Quote:
but i plan on using a apache2 and my sql + logs and firewalls and running a hardned system this time around.


If you're talking about "Hardened Gentoo" (http://www.gentoo.org/proj/en/hardened/), I'd advise you to stay away from that until you are much more experienced with Linux and security in general. Otherwise, you're only going to cause yourself trouble which you will not understand...

Quote:
i added the groups i only needed but some programs didnt work and no error was given that is why i assumed the easiest way to solve this was to make the main account which will be loggin in 24/7 to be allowed acess to everything


So, on one hand, you want to make your system ultra secure, but on the other hand, you want your user to be able to do anything on your computer? See the contradiction?

Quote:
see i need to know how to properly setup a user account (which i was gona give full access to) then so i can add system logs and readers (if u can name some 'industrial' ones used i could test it would be appreciated) and from there learn how to network administrator the system from a user account and such. before moving on.


I recommend using unhardened Gentoo first and trying to set up a usable user account with that. Whenever you bump into something you can't do as an unpriviledged user, ask yourself if you really need to do that as that user and if the answer is really yes, find out or ask about granting that priviledge to the user.

JRV
Back to top
View user's profile Send private message
D-M
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2004
Posts: 103

PostPosted: Sat Jan 14, 2006 1:24 am    Post subject: Reply with quote

Hamster, there is already a user account you have access to that has access to everything and can do anything...Root.

However, like everyone has already said, it isn't a good idea to run as root all the time. The main user account you login with for day to day use should be restricted as possible.

If you are planning on using apache and mysql, you don't need to alter your everyday restricted user account to do so.

as root you install, configure, stop and start these services, and only be logged in as root for the duration of the specific task you need the elevated privileges for. or you log in as a restricted user and open a terminal and su over to root and do your work that way.

If in the case of eterm you need to trouble shoot then ya, log in as root and see if eterm dose what you want. if under root eterm functions as you would expect it too, but not as a restricted user then a little research is needed to make it function as you want under a restricted user account.

I would strongly encourage you to do some research into unix/linux basic security best practices and reconsider your plan.

DM
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Jan 14, 2006 2:00 am    Post subject: Re: ok Reply with quote

InsaneHamster wrote:
well until now iv always ran my box as root.

... so Windows users have arrived here too. I'm wondering how many Suse/Mandriva users use their system as root. All the security POSIX systems offer can be ruined just by "human" (read stupid) users. Some of my friends use to tell Linux is not breached because it is not widespread. Looks like they are right after all ... :(
Back to top
View user's profile Send private message
InsaneHamster
Guru
Guru


Joined: 02 May 2003
Posts: 435

PostPosted: Sat Jan 14, 2006 2:22 am    Post subject: :o Reply with quote

thank you all for your advice and replies. currently i deleted my any files in my /root folder so it is a virgin(no trace left as i used it for my main account)

currently i am in a user account. i redid it so it only has access to certain groups "root bin daemon sys adm disk wheel floppy audio dialout tape video xfs "

all i did was use the same groups that my root account was in... i will need time and knowledge / experience to know what each is for like root bin adm sys are the only ones i dont know on the list so far

the Eterm was solved with a chmod 777 /tmp (turns out it needs to create temporary files)

and from here i learn how to properly run the linux system via a user account while only logging in root for updates. and configuration of system services

:P


EDIT: Just an update changed the account to 4 groups only wheel floppy audio games.

hopefully if i start running into problems someone already has on the forums and theyll be an archived post about it.
Back to top
View user's profile Send private message
JRV
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 291

PostPosted: Sat Jan 14, 2006 11:26 am    Post subject: Re: :o Reply with quote

InsaneHamster wrote:
and from here i learn how to properly run the linux system via a user account while only logging in root for updates. and configuration of system services

:P


Yay! That's the way to go!

Quote:

EDIT: Just an update changed the account to 4 groups only wheel floppy audio games.


Much better.

Quote:
hopefully if i start running into problems someone already has on the forums and theyll be an archived post about it.


It's very likely, yes. And even if you can't find it, people here _love_ to answer questions :)

JRV
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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