[Enterprise SONiC] Username and Password Follow
Tested model & firmware version:
- Switch model name:
AS7326-56X
- Edgecore SONiC version:
202006.4
202012.2
202111.3
Example:
- Default username and password
- How to modify password in SONiC?
- Default sudo password
- How to change the interactive mode of sudo group?
- Reset password if forget username and password
Username and Password
Default username is admin and password is YourPaSsWoRd
How to modify password in SONiC?
- Linux command: passwd
-
admin@sonic:~$ passwd -h
Usage: passwd [options] [LOGIN]Options:
-a, --all report password status on all accounts
-d, --delete delete the password for the named account
-e, --expire force expire the password for the named account
-h, --help display this help message and exit
-k, --keep-tokens change password only if expired
-i, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-l, --lock lock the password of the named account
-n, --mindays MIN_DAYS set minimum number of days before password
change to MIN_DAYS
-q, --quiet quiet mode
-r, --repository REPOSITORY change password in REPOSITORY repository
-R, --root CHROOT_DIR directory to chroot into
-S, --status report password status on the named account
-u, --unlock unlock the password of the named account
-w, --warndays WARN_DAYS set expiration warning days to WARN_DAYS
-x, --maxdays MAX_DAYS set maximum number of days before password
change to MAX_DAYSadmin@sonic:~$
For example:
admin@sonic:~$ sudo passwd admin
Enter new UNIX password: xxxx << enter new password here
Retype new UNIX password: xxxx << enter new password here
passwd: password updated successfully
SUDO
Default sudo password
Default, when you access command by sudo group, system won't request password.
admin@sonic:~$ sudo cat /etc/sudoers | grep "NOPASSWD.*ALL"
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
How to change the interactive mode of sudo group in SONiC?
If you want to request password every time when you run sudo group command. You can modify it as following.
admin@sonic:~$ sudo visudo
%sudo ALL=(ALL:ALL) ALL
Comments
0 comments
Please sign in to leave a comment.