Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo smbpasswd -a <username>
- New SMB password:
- Retype new SMB password:
- ##################################################################
- #!/bin/bash
- mkdir /var/www/html/test
- tee -a /etc/samba/smb.conf << EOF
- [test]
- comment = Test folder
- path = /var/www/html/test
- browsable = yes
- valid users = tester
- read only = no
- EOF
- smbpasswd -a tester
- password
- password
- ##################################################################
- #!/bin/bash
- mkdir /var/www/html/test
- tee -a /etc/samba/smb.conf << EOF
- [test]
- comment = Test folder
- path = /var/www/html/test
- browsable = yes
- valid users = tester
- read only = no
- EOF
- username='tester'
- useradd -m $username
- (echo "password"; sleep 1; echo "password";) | passwd $username
- (echo "password"; sleep 1; echo "password" ) | smbpasswd -s -a $username
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement