LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-04-2003, 12:33 PM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
usermod


I just installed tuxracer, it gives me this output
Code:
* Remember, in order to play games, you have to
 * be in the 'games' group.
 * See the usermod(8) manpage for more information.

 * If you had the game installed before please reset
 * the data_dir variable in ~/.tuxracer/options
>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...
I did do man usermod, could you dumb it down a little for me.

maybe this
#usermod -G games (user)

I don't want to screw up my user account

Last edited by shanenin; 12-04-2003 at 12:40 PM.
 
Old 12-04-2003, 12:44 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
If you do that games will be the only group
the user will be in. Probably not what you want.
Youd have to check which groups the user
already is in, and add those to your list, too.


Alternatively, just manually edit /etc/groups
locate the line that starts with games, and
append the user to it ... if there's currently
NO users, just type his name, if there already
are some, append him using a , before his name.


Cheers,
Tink
 
Old 12-04-2003, 02:04 PM   #3
Tramontane
Member
 
Registered: Oct 2003
Distribution: Debian
Posts: 39

Rep: Reputation: 15
a simple command to use would be:

adduser (user) games

this will accomplish the same thing as manually editting /etc/group. caveat - both the user and group must already exist.

also, the new group info will not take effect until that user logs in again at through a tty terminal(logging back in to KDE or using 'su' is not enough).

Last edited by Tramontane; 12-04-2003 at 02:09 PM.
 
Old 12-04-2003, 02:33 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
adduser would be quite distro-dependent then ...

In slack adduser creates a new user account :}


Cheers,
Tink
 
Old 12-08-2003, 08:49 AM   #5
Tramontane
Member
 
Registered: Oct 2003
Distribution: Debian
Posts: 39

Rep: Reputation: 15
I can't speak for slackware as my experience so far has been limited to debian. adduser can also be used to add users to a system, so I guess the ability to modify group members is just a little extra functionality. It seems that it's just a perl script that makes calls to useradd and it's ilk.

so here are the relevant parts of that script

Code:
NAME
       adduser, addgroup - add a user or group to the system

SYNOPSIS
       adduser  [options] [--home DIR] [--shell SHELL] [--no-cre_
       ate-home]  [--uid  ID]  [--firstuid  ID]  [--lastuid   ID]
       [--ingroup GROUP | --gid ID] [--disabled-password] [--dis_
       abled-login] [--gecos GECOS] user

       adduser --system [options] [--home  DIR]  [--shell  SHELL]
       [--no-create-home] [--uid ID] [--group | --ingroup GROUP |
       --gid   ID]    [--disabled-password]    [--disabled-login]
       [--gecos GECOS] user

       adduser --group [options] [--gid ID] group
       addgroup [options] [--gid ID] group

       adduser [options] user group
Code:
    printf _("Adding user %s to group %s...\n"),$existing_user,$existing_group
        if $verbose;
    &invalidate_nscd();
    # FIXME - the next line has a race condition.
    #&systemcall('usermod', '-G',
                #join(",", get_users_groups($existing_user), $existing_group),
                #$existing_user);
    &systemcall('gpasswd', '-M',
                join(',', get_group_members($existing_group), $existing_user),
                $existing_group);
    #&systemcall('gpasswd', '-a',$existing_user,$existing_group);
    &invalidate_nscd();
    print _("Done.\n") if $verbose;
    exit 0;
so maybe if your distribution has the gpasswd program(which is binary, so not script) you could look into that. But I guess at this point it's easier to just edit the files by hand anyway.

Thanks for the heads up, Tink
 
  


Reply



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
command usermod not found bowie101 Linux - Newbie 12 08-18-2021 01:26 AM
usermod and groupadd meDream Linux - Newbie 0 10-05-2005 05:01 AM
usermod / useradd ? bibilit Linux - Software 1 12-19-2003 02:16 AM
/etc/shadow and useradd -p usermod -p granny Linux - Security 3 08-29-2003 12:24 AM
usermod thelight1 Linux - Newbie 1 07-24-2003 12:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:37 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration