LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2007, 11:05 PM   #1
tehfatal
Member
 
Registered: Mar 2007
Location: NJ
Distribution: Slackware 11, Fedora Core 6, Opensuse 10.2, CentOS 4.4
Posts: 31

Rep: Reputation: 15
Question Creating groups and adding users to that group


I feel like this a really easy problem, but something is escaping me on this. I have a samba share(slack 11 box) and the folder i want to use is /smbshr/public/ off of / . The owner of both folders is root, but for the public folder i want the owner as root and the group as smbshr.

Code:
/smbshr          # root root   770
/smbshr/public   # root smbshr 770
I tried the following to create the group.

Code:
# groupadd smbshr
# usermod -g smbshr user
# chgrp smbsr public
But this doesnt work but if i change the group of public to users i am able to access the folder from windows fine (ie create files, delete, etc). So what is the correct way to do this?

Also while im at it... what are the commands to view details about users, in the of viewing their groups and other stuff i should know about.

Thanks!
 
Old 04-01-2007, 12:07 AM   #2
Buto
Member
 
Registered: Sep 2004
Location: So Cal
Distribution: Slackware 12
Posts: 60

Rep: Reputation: 16
The way I change the owner and group of a file or folder is
Code:
chown username:thegroupiwanttouse /path/to/folder
Ther user you are using to connect to your public folder, are they in the smbshr group?

Forgot to add, group information is stored in /etc/group. or you can type in groups as the user and it will list all the groups they are in.

Last edited by Buto; 04-01-2007 at 12:20 AM.
 
Old 04-01-2007, 12:42 AM   #3
tehfatal
Member
 
Registered: Mar 2007
Location: NJ
Distribution: Slackware 11, Fedora Core 6, Opensuse 10.2, CentOS 4.4
Posts: 31

Original Poster
Rep: Reputation: 15
thnx Buto, but i was talking about creating a new group and then adding users to the group. I figured out my problem.

Code:
# groupadd smbshr
# usermod -G smbshr user
# pico /etc/group (removed the x for group password)
logged out and logged back in, and used the group command for my account and the new group was in there.
 
  


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
Creating Users Into Existing Groups carlosinfl Linux - Server 4 02-07-2007 03:53 PM
adding users to groups in with in console binary1011100 Linux - Newbie 3 11-18-2006 02:15 PM
creating users and groups gurl4sh25 SUSE / openSUSE 3 08-05-2006 12:02 PM
Adding users to a group shipon_97 Linux - Newbie 2 06-04-2006 11:40 AM
creating groups, adding users, and setting permissions bowie101 Linux - Newbie 2 11-23-2005 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:20 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