1. Ubuntu12.04 install samba: sudoapt-getinstallsambasmbfs2, modify configuration: cd/etc/samba/sudomvsmb. conf {,. bak} sudovismb. conf [global] workgroup = WORKGROUPServerstring = myservernetbi
1. Install samba in Ubuntu 12.04:
Sudo apt-get install samba smbfs
2. Modify the Configuration:
Cd/etc/samba/
Sudo mv smb. conf {,. bak}
Sudo vi smb. conf
[Global]
Workgroup = WORKGROUP
Server string = myserver
Netbios name = wispserver
Security = user
Encrypt passwords = yes
Smb password file =/etc/samba/smbpasswd
[Homes]
Browseable = no
Writable = yes
Valid users = % S
Create mode = 0664
Directory mode = 0775
3. Create a user:
Sudo useradd smb
Sudo usermod-d/home/wisp/smd/program_update smb
Sudo smbpasswd-a smb
Enter the password twice.
4. Enable the program:
Sudo/etc/init. d/smbd restart
5. By the way: after connecting to smb in windows, you need to use the net use command to delete the connection if you want to change the user:
Net use displays the current network connection
Net use \ 192.168.9.252 \ IPC $/del Delete smb connection
Then, reconnect to the smb server and enter the account password.
6. Access windows sharing on ubuntu
1) create a mount directory.
Sudo mkdir/home/istone/winshare
2) mount windows sharing.
Sudo mount-t smbfs-o codepage-cp936, iocharset = utf8, username = istone, password = passwd // 192.168.0.103/winshare/home/istone/winshare
-T Mount type
Codepage is the code page of the target system, that is, the windows platform (cp936 refers to gb2312, such as win2k), and iocharset refers to the receiver encoding method of stream transmission (ubuntu is utf8)
Username is the user name in windows and has the read and write permissions for shared folders. Password is the Password corresponding to the user name.
// 192.168.0.103/winshare Windows shared directory.
/Home/istone/winshare/Ubuntu Mount directory