Sharing to Windows and Mounting Windows Shares in Ubuntu: Difference between revisions
From D3xt3r01.tk
Jump to navigationJump to search
m (New page: ==WHY== Because some of my colegues use Windows. One of them has a dir shared where the others put/get files to/from. I need to be able to access it too and share stuff for them to see in...) |
m (→Sharing a dir) |
||
Line 44: | Line 44: | ||
browseable = yes | browseable = yes | ||
read only = no | read only = no | ||
#also check the [globals] section to be like this | |||
[global] | |||
security = user | |||
encrypt passwords = true | |||
map to guest = bad user | |||
guest account = nobody | |||
</source> | </source> | ||
Line 50: | Line 58: | ||
<source lang="bash"> | <source lang="bash"> | ||
sudo smbpasswd -a username | sudo smbpasswd -a username | ||
# | # username should be a real system user | ||
sudo /etc/init.d/samba reload | sudo /etc/init.d/samba reload | ||
</source> | </source> |
Latest revision as of 10:52, 20 January 2010
WHY
Because some of my colegues use Windows. One of them has a dir shared where the others put/get files to/from. I need to be able to access it too and share stuff for them to see in their "Network neighbourhood".
Well, mounting windows shares is easy.
sudo apt-get install smbfs
sudo mkdir /media/mountname
add this line at the end of /etc/fstab ( to auto-mount it )
//server_ip/share_name /media/mountname cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode 0 0
and then do this to mount it ( it'll be auto-mounted at every boot )
sudo mount -a
or do this to mount manually
sudo mount //server_ip/share_name /media/mountname/ -t cifs -o guest,uid=1000,iocharset=utf8,codepage=unicode,unicode
Sharing a dir
We're gonna use samba.
sudo apt-get install nautilus-share
Then edit /etc/samba/smb.conf and search for [homes] . You should uncomment ( the ; char ) it so it would look like this
[homes]
comment = Home Directories
browseable = yes
read only = no
#also check the [globals] section to be like this
[global]
security = user
encrypt passwords = true
map to guest = bad user
guest account = nobody
Last step, reload samba and allow some users to auth.
sudo smbpasswd -a username
# username should be a real system user
sudo /etc/init.d/samba reload