Install Samba and Create a shared directory that anybody can read and write, and authentication is not needed. | ||
| [root@lan ~]#yum -y install samba [root@lan ~]#mkdir /home/share [root@lan ~]#chmod 777 /home/share [root@lan ~]#vi /etc/samba/smb.conf # near line 58: add unix charset = UTF-8 dos charset = CP932 # line 75: change (Windows' default) workgroup =WORKGROUP # line 81: uncomment and change IP address you allow hosts allow = 127.10.0.0. # line 102: change (no auth) security =share # add at the bottom [Share] # any name you like path = /home/share # shared directory writable = yes # writable guest ok = yes # guest OK guest only = yes # guest only create mode = 0777 # fully accessed directory mode = 0777 # fully accessed share modes = yes # warn if some people access to a file [root@lan ~]# /etc/rc.d/init.d/smb start Starting SMB services: [ OK ] [root@lan ~]# /etc/rc.d/init.d/nmb start Starting NMB services: [ OK ] [root@lan ~]# chkconfig smb on [root@lan ~]# chkconfig nmb on |
W e will discuss in detail about special variable in Unix. In one of our previous chapters, we understood how to be careful when we use certain nonalphanumeric characters in variable names. This is because those characters are used in the names of special Unix variables. These variables are reserved for specific functions. For example, the $ character represents the process ID number, or PID, of the current shell − $echo $$ The above command writes the PID of the current shell − 29949 The following table shows a number of special variables that you can use in your shell scripts − Command-Line Arguments The command-line arguments $1, $2, $3, ...$9 are positional parameters, with $0 pointing to the actual command, program, shell script, or function and $1, $2, $3, ...$9 as the arguments to the command. Following script uses various special variables related to the command line − #!/bin/sh echo "File Name: $0" echo "First Parameter : $1" echo "Second Parameter :...
Comments
Post a Comment