VectorLinux
September 18, 2014, 03:27:17 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: add users to groups?  (Read 660 times)
MarkGrieveson
Vectorian
****
Posts: 531


« on: March 14, 2012, 12:28:54 pm »

Hello.  Previously when I wanted to add a user to a group, I would use the "addgroup" command.  For instance, if I wanted to add user "doug" to the group "audio", I would type as root "addgroup doug audio".  However, the addgroup command does not seem to exist here.  Or in Slackware (I couldn't find it on slackfind.net, anyway).  So,  I would appreciate it if someone could enlighten me as to how I add users to groups in this system.
Logged

I am using VL7.0 standard with XFCE
MarkGrieveson
Vectorian
****
Posts: 531


« Reply #1 on: March 14, 2012, 01:41:41 pm »

Nuts.  I definitely screwed up something.  I was trying to make it possible to set it up so that users who belonged to the group "staff" would have the right to install source programs in the /usr/local directory, thus keeping these programs separate from the slapt-packaged installed programs in the /usr/ directory (and making these programs relatively easy to get rid of if they did not come equipped with an uninstall script).  So, I recursively changed the group of /usr/local from root to staff, giving this group read and write privileges.  Then, I wanted to add my user "mark" to the group "staff".  However, the way I've done this on Debian did not work here (via "addgroup", see previous post).

I searched the net and found the command "usermod".  The instructions for it were almost incomprehensible to me, but I gave it a try anyway.  However, the result was somewhat bizarre and it certainly did not do what I was hoping it would do, that being to simply add my user to the group and let me work freely in the /usr/local directory.  Instead, it created a clone of my user, and added the clone to the group!  

I ran the following:
Code:
vector://home/mark/slackpacks/gscan2pdf
root:# usermod -a -G staff mark
vector://home/mark/slackpacks/gscan2pdf
root:# exit
exit
vector:/~/slackpacks/gscan2pdf
mark:$ groups
mark disk lp floppy audio video cdrom games slocate plugdev power netdev scanner users
vector:/~/slackpacks/gscan2pdf
mark:$ users
mark mark
vector:/~/slackpacks/gscan2pdf
mark:$ groups mark
mark : mark disk lp floppy audio video cdrom games slocate plugdev power netdev scanner users staff
vector:/~/slackpacks/gscan2pdf
mark:$ groups
mark disk lp floppy audio video cdrom games slocate plugdev power netdev scanner users
vector:/~/slackpacks/gscan2pdf
mark:$ groups mark
mark : mark disk lp floppy audio video cdrom games slocate plugdev power netdev scanner users staff
vector:/~/slackpacks/gscan2pdf
mark:$ ls
gscan2pdf-0.9.31-i686-3jsc.txz  gscan2pdf-0.9.32.tar.gz  gscan2pdf-1.0.1.tar.gz
gscan2pdf-0.9.31.tar.gz         gscan2pdf-1.0.0.tar.gz
vector:/~/slackpacks/gscan2pdf
mark:$ cp gscan2pdf-1.0.1.tar.gz /usr/local/src
cp: cannot create regular file `/usr/local/src/gscan2pdf-1.0.1.tar.gz': Permission denied
vector:/~/slackpacks/gscan2pdf
mark:$ ls -l /usr/local/  
total 40
drwxrwxr-x  2 root staff 4096 Nov 24  1993 bin/
drwxrwxr-x  2 root staff 4096 Nov 24  1993 etc/
drwxrwxr-x  2 root staff 4096 Mar 13 12:42 games/
drwxrwxr-x  2 root staff 4096 Mar 15  1994 include/
drwxrwxr-x  2 root staff 4096 Nov 24  1993 info/
drwxrwxr-x  2 root staff 4096 Mar 15  1994 lib/
drwxrwxr-x 22 root staff 4096 Jun  1  1994 man/
drwxrwxr-x  2 root staff 4096 Nov 24  1993 sbin/
drwxrwxr-x  4 root staff 4096 Mar 13 12:36 share/
drwxrwxr-x  2 root staff 4096 Nov 24  1993 src/
I'm reminded of the movie Moon.

Anyway, from the above, apparently my clone could copy a file into /usr/local/src, but I cannot.  Maybe me and my clone will be merged if I reboot.  Here goes...
« Last Edit: March 14, 2012, 02:14:14 pm by MarkGrieveson » Logged

I am using VL7.0 standard with XFCE
MarkGrieveson
Vectorian
****
Posts: 531


« Reply #2 on: March 14, 2012, 02:24:47 pm »

Well, I think rebooting solved it.  I can now freely work with the /usr/local directory.  However, the machine is still reporting two users named "mark".  Is this normal, or have I created a clone?  If I have created a clone, can I get rid of it?

Code:
root:# users
mark mark
Logged

I am using VL7.0 standard with XFCE
pierce.jason
Packager
Vectorite
****
Posts: 250



« Reply #3 on: March 21, 2012, 06:23:49 pm »

`man users`
Quote
users  -  print the user names of users currently logged in to the current host

This isn't listing valid usernames on the system, but rather instances of access to a username.

You can also do some user/group management from within vasm.
Logged

pierce.jason
Email: $(echo -e "moc\x2eliamg\x40nosaj.ecreip" | rev)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!