hi all,
I have made this simple smb configuration which may help out Keith and anyone else to share files on a Linux server using Samba. the most impotant part is the membership into the group and the chmod permissions given to te directory.

su -
mkdir /shared

vi /etc/samba/smb.conf

[shared]
  comment = My stuff
  path = /shared
  valid users = dino fred
  public = no
  writable = yes
  printable = no
  create mask = 0765


service smb restart

chown dino:dino /shared

now writing as dino is enabled

useradd fred
passwd fred
smbpasswd -a fred

fred can login to directory but cannot write

drwxr-xr-x    2 dino dino  4096 Dec  8 07:12 shared

chmod 2775 /shared

drwxrwsr-x    2 dino dino  4096 Dec  8 07:12 shared

gpasswd -a fred dino
Adding user fred to group dino

now fred can login to share and access dino's files and also create new files


Dino Conti


----- Original Message ----- From: "Keith Vassallo" <[EMAIL PROTECTED]>
To: "Malta Linux User Group - general list" <[email protected]>
Sent: Tuesday, December 07, 2004 5:56 PM
Subject: [LINUX.ORG.MT] Samba share as non-root


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi List,

I've been having a problem with samba every since I started using Linux:

I have created a share on one of my computers. Here is the relevant
part from smb.conf:

[keith_private]
path = /home/keithvassallo_net/shared
comment = Keith's private directory on atomserv.net
valid_users = keithvassallo_net
public = no
readonly = no
writable  yes

On the other computer, I mount the samba share, from /etc/fstab:
//192.168.1.100/keith_private /home/keithvassallo/keith_private smbfs
credentials=/home/keithvassallo/.smbpasswd 0 0

As you may have noticed, the username on the computer sharing is
keithvassallo_net, whilst on my PC (the computer I am mounting on) the
user name is keithvassallo. The above arrangement works - but
/home/keithvassallo/keith_private is mounted as readonly for all users
except root. This means I have to login as root to write anything to
the share, which is starting to bother me (after 4 years, you start
getting fed up of it). Anyway, I've tried several modifications to the
line in fstab:

//192.168.1.100/keith_private /home/keithvassallo/keith_private smbfs
credentials=/home/keithvassallo/.smbpasswd,uid=keithvassallo,gid=users 0 0

When I tried the line above, the permissions for files were set to 505
- - the uid of keithvassallo_net on the PC sharing the files.

Can anyone please help?

Keith
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBteClym3HAdrlsyERAowiAJ9LluZqUEswNt3ARJBZ1XrxZ4ReZQCdGAZ+
n+oaLTavsRaRKxHpj0xiSOQ=
=4kqP
-----END PGP SIGNATURE-----

_______________________________________________
MLUG-list mailing list
[email protected]
http://mailserv.megabyte.net/mailman/listinfo/mlug-list


Reply via email to