Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- / # ls -lh /bin/busybox
- -rwxr-xr-x 1 root root 797.7K May 5 06:41 /bin/busybox
- / # adduser student
- Changing password for student
- New password:
- Bad password: too short
- Retype password:
- passwd: password for student changed by root
- / # su student -
- / $
- / # echo 'student ALL=(ALL) ALL' >> /etc/sudoers
- / # visudo -c
- /bin/sh: visudo: not found
- / # apk add visudo
- fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
- fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
- ERROR: unable to select packages:
- visudo (no such package):
- required by: world[visudo]
- / # apk add sudo
- (1/1) Installing sudo (1.9.13_p3-r2)
- Executing busybox-1.36.0-r9.trigger
- OK: 9 MiB in 16 packages
- / # visudo -c
- /etc/sudoers: bad permissions, should be mode 0440
- / # chmod 0440 /etc/visudo
- chmod: /etc/visudo: No such file or directory
- / # chmod 0440 /etc/sudoers
- / # visudo -c
- /etc/sudoers: parsed OK
- / # su student -
- / $ sudo su -
- We trust you have received the usual lecture from the local System
- Administrator. It usually boils down to these three things:
- #1) Respect the privacy of others.
- #2) Think before you type.
- #3) With great power comes great responsibility.
- For security reasons, the password you type will not be visible.
- [sudo] password for student:
- efb779e4dab8:~#
Advertisement
Add Comment
Please, Sign In to add comment