[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SAMBA Permissions



Thanks a million Aaron.  It works perfectly.  I worked on that for an hour 
and a half last night and didn't seem to get anywhere, but after I read 
your email, I had it running in about 2 minutes.  Maybe you should do 
Linux tech support? 

I am somewhat patient with computers as long as I am making some kind of 
progress along the way. When I work on something for hours and don't 
get anywhere, anyone in the room better be prepared to dodge books and 
screwdrivers.

Have a great Linux day...

Ricky

On Wed, 14 Nov 2001, Aaron Cronkright wrote:

> The mount command (which is run as root during startup script execution)
> will assign the group id and user id on all files of a mounted volume to the
> user running the command.  Since you are doing it at startup, all files gid
> and uid are set to root.
> 
> Try this:
> 
> mount -t vfat -o gid=[gid of samba user(s)] -o uid=[uid of samba user(s)]
> /dev/hdb1 /mnt/data1
> 
> 
> where:
> gid=group id
> uid=user id
> 
> get the gid and uid from /etc/passwd
> 
> setting the 'auto' flag in fstab will mount any volume automatically at
> startup rather than generating a seprate script file to do it.
> 
> also, the uid and gid of the mountpoint dir (/mnt/data1) will also be set to
> the gid and uid specified in the mount command above.
> 
> For this to work, the samba user must be defined in both the/etc/passwd and
> /etc/smbpasswd files.  /etc/passwd for setting the uid and gid;
> /etc/smbpasswd for access to the share defined in smb.conf.
> 
> Hope this helps....(sharply scold me if it doesn't)
> 
> I learned this the hard way when I tried to utilize my zip drive on the
> linux box from my windoze box and couldn't write any files to it.
> 
> Aaron Cronkright
> aaron@cronkright.com
> 
> ----- Original Message -----
> From: "rbryce" <rbryce@mcleodusa.net>
> To: <luci-discuss@luci.org>
> Sent: Wednesday, November 14, 2001 4:15 PM
> Subject: SAMBA Permissions
> 
> 
> > I just installed Red Hat 7.2 on my home server.  I set it up with USER
> > level security.  Unfortunately I have to run windows on my laptop because
> > of work applications.  From the laptop I can access the samba shares on
> > the server, but cannot write to the shares if I am connected as a standard
> > user.  I have to connect as ROOT using the ROOT password in order to write
> > to the share on the server.
> >
> > On the server end:  I have 2 drives.  HDB has 2 FAT32 partitions, HDB1 and
> > HDB2.  HDA is the system drive.
> >
> > Maybe I am going about this wrong, but here is what I am doing:  In init.d
> > I have a /bin/bash file that contains one line of script to mount the
> > drive:  mount -w /dev/hdb1 /mnt/data1 (I created the data1 folder in the
> > mnt directory)  There are symlinks to this file in RC3.d and RC5.d.
> >
> > The script is executing fine, but when the machine comes up, the
> > /mnt/data1 folder has a root as owner and root as group.  I tried to
> > create a group just for smb users and give the group write priveledges to
> > /mnt/data1, but I cannot modify the attributes (chmod) of /mnt/data1 once
> > it has been mounted.   Is there a flag on the mount command that will let
> > me specify write permissions to ordinary real users?
> >
> > By the way I did purchase Kara's book, RHCE exam cram, and think it is an
> > excellent resource even for those not interested in becoming certified.
> > Thanks Kara.
> >
> >
> > Ricky
> >
> > -
> > To unsubscribe, send email to majordomo@luci.org with
> > "unsubscribe luci-discuss" in the body.
> 
> -
> To unsubscribe, send email to majordomo@luci.org with
> "unsubscribe luci-discuss" in the body.
> 
> 

-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.