SliTaz GNU/Linux official and community documentation wiki.
.png

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:guides:samba [2013/04/28 20:45]
emgi [How does it work?]
en:guides:samba [2013/04/28 21:12]
emgi [How does it work?]
Line 18: Line 18:
 Enter User's password: **** Enter User's password: ****
 </​code>​ </​code>​
-This will provide a list of the shares available on the machine called ​nas. Although not strictly required, it is recommended to add the server name to /etc/hosts for name resolution when it has a fixed ip address. Because we are running on Linux we need to '​escape'​ the backslashes in the UNC path, effectively needing twice the number of them like this: +This will provide a list of the shares available on \\nas. The result should look similar to the example below:  
 +<​code>​ 
 +Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3-31a.osstech] 
 + 
 + Sharename ​      ​Type ​     Comment 
 + --------- ​      ​---- ​     ------- 
 + IPC$            IPC       IPC Service ("My NAS"​) 
 + webaxs ​         Disk       
 + share ​          ​Disk ​     LinkStation folder 
 + info            Disk      LinkStation Utilities 
 +Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3-31a.osstech] 
 + 
 + Server ​              ​Comment 
 + --------- ​           ------- 
 + NAS                  My NAS 
 + 
 + Workgroup ​           Master 
 + --------- ​           ------- 
 + WORKGROUP ​           NAS 
 +#  
 +</​code>​ 
 +From the above example, we are interested in access to Sharename '​share'​. Although not strictly required, it is recommended to add the server name to /etc/hosts for name resolution when it has a fixed ip address. Because we are running on Linux we need to '​escape'​ the backslashes in the UNC path, effectively needing twice the number of them. Accessing \share on \\nas goes like this: 
 <​code>​ <​code>​
 # smbclient \\\\nas\\share # smbclient \\\\nas\\share
Line 24: Line 45:
 smb: \>  smb: \> 
 </​code>​ </​code>​
-At this prompt you can issue ftp-style commands to browse the file system and read/write files. ​+At the prompt you can issue ftp-style commands to browse the file system and read/write files. ​Typing **help** gives you a summary of the options:  
 +<​code>​ 
 +smb: \> help 
 +?              allinfo ​       altname ​       archive ​       blocksize ​      
 +cancel ​        ​case_sensitive cd             ​chmod ​         chown           
 +close          del            dir            du             ​echo ​           
 +exit           ​get ​           getfacl ​       hardlink ​      ​help ​           
 +history ​       iosize ​        ​lcd ​           link           ​lock ​           
 +lowercase ​     ls             ​l ​             mask           ​md ​             
 +mget           ​mkdir ​         more           ​mput ​          ​newer ​          
 +open           ​posix ​         posix_encrypt ​ posix_open ​    ​posix_mkdir ​    
 +posix_rmdir ​   posix_unlink ​  ​print ​         prompt ​        ​put ​            
 +pwd            q              queue          quit           ​readlink ​       
 +rd             ​recurse ​       reget          rename ​        ​reput ​          
 +rm             ​rmdir ​         showacls ​      ​setmode ​       stat            
 +symlink ​       tar            tarmode ​       translate ​     unlock ​         
 +volume ​        ​vuid ​          ​wdel ​          ​logon ​         listconnect ​    
 +showconnect ​   ..             ​! ​              
 +smb: \>  
 +</​code>​
  
 Fortunately you can also access a Windows share by mounting it on your box like this:  Fortunately you can also access a Windows share by mounting it on your box like this: 
 
en/guides/samba.txt · Last modified: 2013/04/30 22:12 by linea