Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need a bit of help here. I have installed Ubuntu Server edition dual boot with Windows XP.
I mounted my shared partition on fat32.
When it is booted in Ubuntu, the users (all windows) can't access to it, only the first user i created can. I managed to let another user access the shared folders in Ubuntu (the fat32 partition), and added that user in Samba (smbpassword -a username). Then edited the smbconfig, and gave write list and valid users those two usernames. But my second user can't access anything yet, he/she can access those folders when logged on in ubuntu, but not over the network with Samba's username and password.
Is the share located on the Ubuntu server? If so, make sure that the you allow "o" others to read/write to the directory. You don't want the Linux permissions of the directory to be more restrictive than the share.
There are several things that you left out of your post. Is the share one that anyone can access? Are you using SECURITY=share or SECURITY=user?
Look and see if you have a samba-doc package. If not, maybe you still have 3 books supplied by the samba package instead. If not, you can download the book "Samba 3 by Example". One of the first two examples may resemble what you want to do. For example, there is a share that allows guest access. To make things simple, it uses "force user" and "force group" to match the user/group ownership of the directory:
Code:
# Global Parameters − Newer Configuration
[global]w orkgroup = MIDEARTH
printing = CUPS
print cap name = CUPS
map to guest = Bad User
show add printer wizard = No
wins support = yes
[FTMFILES]
comment = Funds Tracking & Management Files
path = /data/ftmfiles
read only = No
force user = abmas
force group = office
guest ok = Yes
nt acl suppor t = No
[office]
comment = General Office Files
path = /data/officefiles
read only = No
force user = abmas
force group = office
guest ok = Yes
nt acl support = No
[printers]
comment = Print Temporary Spool Configuration
path = / var / spo o l /samba
printable = Yes
guest ok = Yes
use client driver = Yes
browseable = No
These steps where used to create the shares:
Create a group account for office file storage:
Create a user account for office file storage:
root# useradd -m abmas
root# passwd abmas
Changing password for abmas.
New password: XXXXXXXX
Re-enter new password: XXXXXXXX
Password changed
where XXXXXXXX is a secret password.
Create a mount point for the file system that can be used to store all
data files. Create a directory called /data:
root# mkdir /data
root# chmod 755 /data
The 755 permissions on this directory (mount point) permit the owner
to read, write, and execute, and the group and everyone else to read
and execute only.
format the partition with a suitable file
system. (Note: You didn't need to use fat32 for a windows client to access the share. A linux filessytem would be more suitable because you don't need to set the permissions and ownership in the mount command. I would recommend changing to a Linux native filesystem.)
Under the directory called /data, create two directories named ftmfiles
and officefiles, and set ownership and permissions:
root# mkdir -p /data/{ftmfiles,officefiles/{letters,invitations,misc}}
root# chown -R abmas:office /data
root# chmod -R ug+rwxs,o-w,o+rx /data
([SIZE="1"]Note: I you use fat32, you can't use the chmod command. How will you set the sticky bit to protect files from deletion by other users.)
If the partition is fat32 so that you can access it when running windows on the machine, then you can use the "umask" and "fmask" option on the partitions entry in /etc/fstab.
If you are using "security = user" look in the smb.conf manpage for "write list"
Code:
write list (S)
This is a list of users that are given read-write access to a ser‐
vice. If the connecting user is in this list then they will be given
write access, no matter what the read only option is set to. The
list can include group names using the @group syntax.
Note that if a user is in both the read list and the write list then
they will be given write access.
By design, this parameter will not work with the security = share in
Samba 3.0.
Default: write list =
Example: write list = admin, root, @staff
The thing is, i cant change the folder permissions to give others rights, i have tried a hundred times, but i cannot, not through the interface and not through the command line...
By the way, i have security = user and all the users in the write list option for the folders being shared.
About the filesystem, i heard that the only way that Linux AND windows can read and write into a file is if the filesystem is fat32????
This is true for a local partition, when you dual boot between Linux and Windows. It isn't the case for a samba share. You can share directory on a Linux filesystem, and the other windows computers will be able to write to it. It is Samba that does the writing to the filesystem.
What is the "ls -ld" listing of the directory that you are sharing. If you use the "umask" and "fmask" options you can enable others to write to the disk. Then using "read only = no" may enable the user to write to the disk. There is also the "write list =" entries.
Also check the samba logs. They may indicate why access is denied.
Hello jschiwal!
It made it work. I read somewhere that all the computers had to be in the same workgroup, i didnt have the server in a workgroup, joined it and worked!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.