func (u *SessionUtil) CreateLocalAdminUser(log log.T) (newPassword string, err error) {

	userExists, _ := u.DoesUserExist(appconfig.DefaultRunAsUserName)

	if userExists {
		log.Infof("%s already exists.", appconfig.DefaultRunAsUserName)
	} else {
		if err = u.createLocalUser(log); err != nil {
			return
		}
		// only create sudoers file when user does not exist
		err = u.createSudoersFileIfNotPresent(log)
	}

	return
}
// createLocalAdminUser creates a local OS user on the instance with admin permissions. The password will alway be empty
createLocalAdminUser creates a local OS user on the instance with admin permissions. The password will alway be empty
// createLocalAdminUser creates a local OS user on the instance with admin permissions . The password will alway be empty
func (u *SessionUtil) CreateLocalAdminUser(log log.T) (newPassword string, err error) {
	userExists, _ := u.DoesUserExist(appconfig.DefaultRunAsUserName)
	if userExists {
		log.Infof("%s already exists.", appconfig.DefaultRunAsUserName)
	} else {
		if err = u.createLocalUser(log); err != nil {
			return
		}
		err = u.createSudoersFileIfNotPresent(log)
	}
	return
}
func ( u * SessionUtil ) CreateLocalAdminUser ( log log . T ) ( newPassword string , err error ) { userExists , _ := u . DoesUserExist ( appconfig . DefaultRunAsUserName ) if userExists { log . Infof ( " " , appconfig . DefaultRunAsUserName ) } else { if err = u . createLocalUser ( log ) ; err != nil { return } err = u . createSudoersFileIfNotPresent ( log ) } return }
createLocalAdminUser creates a local OS user on the instance with admin permissions.
createLocalAdminUser creates a local OS user on the instance with admin permissions .
// only create sudoers file when user does not exist