Jump to content

Problem with linux permissions.

I created a user "domain.com" with following command "useradd -s /bin/false -m domain.com". It automatically creates home folder and group "domain.com".

Then I created a user "user1" with command "useradd -s /bin/false -m user1". Now I would like this user to be access home directory of "domain.com".

 

So I added user "user1" to the group "domain.com" and changed permissions of "/home/domain.com" to 0775.

For some reason I still get access denied, even after restart...

 

Any hints or tips?

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

If you type:

 

 

id domain.com

 

and

 

id user1

 

what are the groups?

 

Also, for shared files you should place a share directory somewhere else like /mnt or /project and assign a new group and have user1 and domain.com part of the group. You shouldn't have users cross others home dir's, except for read only access. You also need to set the sticky group bit for the group share directory.

I roll with sigs off so I have no idea what you're advertising.

 

This is NOT the signature you are looking for.

Link to comment
Share on other sites

Link to post
Share on other sites

If you type:

 

 

id domain.com

 

and

 

id user1

 

what are the groups?

 

Also, for shared files you should place a share directory somewhere else like /mnt or /project and assign a new group and have user1 and domain.com part of the group. You shouldn't have users cross others home dir's, except for read only access. You also need to set the sticky group bit for the group share directory.

 

According to the output, user1 is in group domain.com.

After I checked this, I tried accessing domain.com homefolder as user1 and it worked.

Without changing anything. No clue as to why, maybe some sort of cache was cleared....

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

According to the output, user1 is in group domain.com.

After I checked this, I tried accessing domain.com homefolder as user1 and it worked.

Without changing anything. No clue as to why, maybe some sort of cache was cleared....

 

Or, you users were still not in the group, when you added user1 to domain.com's group you needed to open a new shell for it to be applied as the shell you were in did not have the setting yet even if you applied it with that shell.

I roll with sigs off so I have no idea what you're advertising.

 

This is NOT the signature you are looking for.

Link to comment
Share on other sites

Link to post
Share on other sites

Or, you users were still not in the group, when you added user1 to domain.com's group you needed to open a new shell for it to be applied as the shell you were in did not have the setting yet even if you applied it with that shell.

That would be correct. I added extra users to have access and had same problem.

Re-opening console fixed the issue again.

 

I also have some issues with samba. Server#1 is sharing storage files and such. It works with following smb.conf file

#======================= Global Settings =====================================[global]workgroup = WORKGROUPserver string = Samba Server %vnetbios name = ubuntusecurity = usermap to guest = bad userdns proxy = no#============================ Share Definitions ==============================[WowzaContent]path                    = /storage/WowzaContentbrowsable               = yeswriteable               = yesguest ok                = novalid users             = @storageuserscreate mask             = 0775force create mode       = 0775directory mask          = 0775force directory mode    = 0775[StorageShare]path                    = /storage/StorageSharebrowsable               = yeswriteable               = yesguest ok                = novalid users             = @storageuserscreate mask             = 0775force create mode       = 0775directory mask          = 0775force directory mode    = 0775

Whenever I change netbiosname to something else and restart smbd, I get access denied when trying to access the share from linux or window.

 

Now Server#2 is sharing some other files and it has exactly same smb as above but different shares and netbiosname. This server doesn't event list shares when accessing it.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I take it you restarted the samba service after changing the netbiosname?

 

sudo /etc/init.d/samba restart

 

or for Ubuntu

 

sudo service smbd restart

and

sudo service nmbd restart

 

The config file looks fine, unless you have a conflicting name on your network?

I roll with sigs off so I have no idea what you're advertising.

 

This is NOT the signature you are looking for.

Link to comment
Share on other sites

Link to post
Share on other sites

I take it you restarted the samba service after changing the netbiosname?

 

sudo /etc/init.d/samba restart

 

or for Ubuntu

 

sudo service smbd restart

and

sudo service nmbd restart

 

The config file looks fine, unless you have a conflicting name on your network?

Yup. Restarted it and changed netbios name.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×