Home
last modified time | relevance | path

Searched refs:username (Results 1 – 25 of 213) sorted by relevance

123456789

/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/pam/
H A Dpam_short_password.ksh43 log_mustnot ismounted "$TESTPOOL/pam/${username}"
49 echo "testpass" | pamtester ${pamservice} ${username} open_session
51 log_must ismounted "$TESTPOOL/pam/${username}"
55 printf "testpass\nshort\nshort\n" | pamtester -v ${pamservice} ${username} chauthtok
58 log_must pamtester ${pamservice} ${username} close_session
60 log_mustnot ismounted "$TESTPOOL/pam/${username}"
64 echo "testpass" | pamtester ${pamservice} ${username} open_session
66 log_mustnot ismounted "$TESTPOOL/pam/${username}"
68 log_must pamtester ${pamservice} ${username} close_session
71 echo "short" | pamtester ${pamservice} ${username} open_session
[all …]
H A Dpam_recursive.ksh29 username="${username}rec"
36 -o keylocation=prompt "$TESTPOOL/pampam/pam/${username}"
37 log_must zfs unmount "$TESTPOOL/pampam/pam/${username}"
38 log_must zfs unload-key "$TESTPOOL/pampam/pam/${username}"
39 log_must add_user pamtestgroup ${username} "$TESTDIR/rec"
42 log_must [ "$(get_prop keystatus "$TESTPOOL/pampam/pam/${username}")" = "$1" ]
45 log_mustnot ismounted "$TESTPOOL/pampam/pam/${username}"
49 echo "recurpass" | pamtester ${pamservice} ${username} open_session
51 log_must ismounted "$TESTPOOL/pampam/pam/${username}"
54 log_must pamtester ${pamservice} ${username} close_session
[all …]
H A Dpam_nounmount.ksh29 log_mustnot ismounted "$TESTPOOL/pam/${username}"
33 echo "testpass" | pamtester ${pamservice} ${username} open_session
35 log_must ismounted "$TESTPOOL/pam/${username}"
38 echo "testpass" | pamtester ${pamservice} ${username} open_session
41 log_must ismounted "$TESTPOOL/pam/${username}"
43 log_must pamtester ${pamservice} ${username} close_session
46 log_must ismounted "$TESTPOOL/pam/${username}"
48 log_must pamtester ${pamservice} ${username} close_session
51 log_must ismounted "$TESTPOOL/pam/${username}"
52 log_must zfs unmount "$TESTPOOL/pam/${username}"
[all …]
H A Dpam_change_unmounted.ksh29 log_mustnot ismounted "$TESTPOOL/pam/${username}"
34 printf "testpass\nsecondpass\nsecondpass\n" | pamtester -v ${pamservice} ${username} chauthtok
36 log_mustnot ismounted "$TESTPOOL/pam/${username}"
39 echo "secondpass" | pamtester ${pamservice} ${username} open_session
41 log_must ismounted "$TESTPOOL/pam/${username}"
44 printf "secondpass\ntestpass\ntestpass\n" | pamtester -v ${pamservice} ${username} chauthtok
46 log_must ismounted "$TESTPOOL/pam/${username}"
47 log_must ismounted "$TESTPOOL/pam/${username}"
50 log_must pamtester ${pamservice} ${username} close_session
52 log_mustnot ismounted "$TESTPOOL/pam/${username}"
H A Dpam_basic.ksh29 log_mustnot ismounted "$TESTPOOL/pam/${username}"
33 echo "testpass" | pamtester ${pamservice} ${username} open_session
35 log_must ismounted "$TESTPOOL/pam/${username}"
38 echo "testpass" | pamtester ${pamservice} ${username} open_session
40 log_must ismounted "$TESTPOOL/pam/${username}"
43 log_must pamtester ${pamservice} ${username} close_session
45 log_must ismounted "$TESTPOOL/pam/${username}"
48 log_must pamtester ${pamservice} ${username} close_session
50 log_mustnot ismounted "$TESTPOOL/pam/${username}"
H A Dsetup.ksh33 log_must add_user pamtestgroup ${username}
36 …-o encryption=aes-256-gcm -o keyformat=passphrase -o keylocation=prompt "$TESTPOOL/pam/${username}"
37 log_must zfs unmount "$TESTPOOL/pam/${username}"
38 log_must zfs unload-key "$TESTPOOL/pam/${username}"
/freebsd/usr.sbin/jexec/
H A Djexec.c52 static void get_user_info(const char *username, const struct passwd **pwdp,
64 const char *username, *shell, *term; in main() local
67 username = NULL; in main()
78 username = optarg; in main()
82 username = optarg; in main()
97 get_user_info(username, &pwd, &lcap); in main()
109 if (clean || username != NULL) { in main()
112 get_user_info(username, &pwd, &lcap); in main()
123 if (setusercontext(lcap, pwd, pwd->pw_uid, username in main()
132 if (clean && username && chdir(pwd->pw_dir) < 0) in main()
[all …]
/freebsd/contrib/wpa/src/eap_peer/
H A Dmschapv2.c15 const u8 * mschapv2_remove_domain(const u8 *username, size_t *len) in mschapv2_remove_domain() argument
26 if (username[i] == '\\') { in mschapv2_remove_domain()
28 return username + i + 1; in mschapv2_remove_domain()
32 return username; in mschapv2_remove_domain()
44 const u8 *username; in mschapv2_derive_response() local
51 username = mschapv2_remove_domain(identity, &username_len); in mschapv2_derive_response()
53 username, username_len); in mschapv2_derive_response()
60 username, username_len); in mschapv2_derive_response()
67 username, username_len, in mschapv2_derive_response()
71 username, username_len, nt_response, in mschapv2_derive_response()
[all …]
/freebsd/crypto/heimdal/lib/krb5/
H A Dget_default_principal.c110 char username[1024]; in _krb5_get_default_principal_local() local
111 ULONG sz = sizeof(username); in _krb5_get_default_principal_local()
113 if (GetUserNameEx(NameUserPrincipal, username, &sz)) { in _krb5_get_default_principal_local()
114 return krb5_parse_name_flags(context, username, in _krb5_get_default_principal_local()
123 char username[1024]; in _krb5_get_default_principal_local() local
124 DWORD dsz = sizeof(username); in _krb5_get_default_principal_local()
126 if (GetUserName(username, &dsz)) { in _krb5_get_default_principal_local()
127 return krb5_make_principal(context, princ, NULL, username, NULL); in _krb5_get_default_principal_local()
133 const char * username = get_env_user(); in _krb5_get_default_principal_local() local
135 if (username == NULL) { in _krb5_get_default_principal_local()
[all …]
/freebsd/usr.sbin/adduser/
H A Dadduser.sh160 err "Invalid shell ($_sh) for user $username."
207 _name="-n '$username'"
266 err "There was an error adding user ($username)."
277 err "There was an error adding user ($username)."
280 info "Successfully added ($username) to the user database."
283 info "Password for ($username) is: $randompass"
288 if ${PWCMD} lock $username ; then
289 info "Account ($username) is locked."
291 info "Account ($username) could NOT be locked."
321 done <"$msgfile" | ${MAILCMD} -s"Welcome" ${username}
[all …]
/freebsd/usr.bin/mdo/
H A Dmdo.c29 const char *username = "root"; in main() local
36 username = optarg; in main()
48 if ((pw = getpwnam(username)) == NULL) { in main()
49 if (strspn(username, "0123456789") == strlen(username)) { in main()
51 uid_t uid = strtonum(username, 0, UID_MAX, &errp); in main()
57 err(EXIT_FAILURE, "invalid username '%s'", username); in main()
/freebsd/crypto/heimdal/lib/gssapi/ntlm/
H A Dinit_sec_context.c38 char **username, struct ntlm_buf *key) in from_file() argument
64 *username = strdup(u); in from_file()
79 char **username, struct ntlm_buf *key) in get_user_file() argument
89 if (from_file(fn, target_name->domain, username, key) == 0) in get_user_file()
100 get_user_ccache(const ntlm_name name, char **username, struct ntlm_buf *key) in get_user_ccache() argument
109 *username = NULL; in get_user_ccache()
128 username); in get_user_ccache()
174 ret = get_user_file(target_name, &cred->username, &cred->key); in _gss_ntlm_get_user_cred()
176 ret = get_user_ccache(target_name, &cred->username, &cred->key); in _gss_ntlm_get_user_cred()
194 (*to)->username = strdup(from->username); in _gss_copy_cred()
[all …]
/freebsd/contrib/wpa/src/eap_server/
H A Deap_server_aka.c94 const char *username) in eap_aka_check_identity_reauth() argument
97 username[0] != EAP_AKA_PRIME_REAUTH_ID_PREFIX) in eap_aka_check_identity_reauth()
100 username[0] != EAP_AKA_REAUTH_ID_PREFIX) in eap_aka_check_identity_reauth()
103 wpa_printf(MSG_DEBUG, "EAP-AKA: Reauth username '%s'", username); in eap_aka_check_identity_reauth()
105 username); in eap_aka_check_identity_reauth()
158 char *username; in eap_aka_check_identity() local
169 username = sim_get_username(identity, identity_len); in eap_aka_check_identity()
170 if (username == NULL) in eap_aka_check_identity()
173 if (eap_aka_check_identity_reauth(sm, data, username) > 0) { in eap_aka_check_identity()
174 os_free(username); in eap_aka_check_identity()
[all …]
H A Deap_server_sim.c117 char *username; in eap_sim_build_start() local
119 username = sim_get_username(sm->identity, sm->identity_len); in eap_sim_build_start()
120 if (username && username[0] == EAP_SIM_REAUTH_ID_PREFIX && in eap_sim_build_start()
122 username)) in eap_sim_build_start()
125 os_free(username); in eap_sim_build_start()
457 char *username; in eap_sim_process_start() local
501 username = sim_get_username(identity, identity_len); in eap_sim_process_start()
502 if (username == NULL) in eap_sim_process_start()
505 if (username[0] == EAP_SIM_REAUTH_ID_PREFIX) { in eap_sim_process_start()
507 username); in eap_sim_process_start()
[all …]
/freebsd/usr.bin/login/
H A Dlogin.c131 static char *username; /* user name */ variable
186 badlogin(username); in main()
229 username = strdup(*argv); in main()
230 if (username == NULL) in main()
277 olduser = username; in main()
278 username = getloginname(); in main()
287 if (failures && strcmp(olduser, username) != 0) { in main()
295 pam_err = pam_start("login", username, &pamc, &pamh); in main()
320 (void)getpwnam_r(username, &pwres, pwbuf, sizeof(pwbuf), &pwd); in main()
367 badlogin(username); in main()
[all …]
/freebsd/contrib/openbsm/libbsm/
H A Dbsm_user.c64 char *username, *always, *never; in userfromstr() local
67 username = strtok_r(str, user_delim, &last); in userfromstr()
71 if ((username == NULL) || (always == NULL) || (never == NULL)) in userfromstr()
74 if (strlen(username) >= AU_USER_NAME_MAX) in userfromstr()
77 strlcpy(u->au_name, username, AU_USER_NAME_MAX); in userfromstr()
240 au_user_mask(char *username, au_mask_t *mask_p) in au_user_mask() argument
251 if ((up = getauusernam_r(&u, username)) != NULL) { in au_user_mask()
/freebsd/crypto/openssh/
H A Dloginrec.c320 if (strlcpy(li->username, pw->pw_name, sizeof(li->username)) >= in login_get_lastlog()
321 sizeof(li->username)) { in login_get_lastlog()
324 (unsigned long)sizeof(li->username) - 1); in login_get_lastlog()
345 logininfo *login_alloc_entry(pid_t pid, const char *username, in login_alloc_entry() argument
351 login_init_entry(newli, pid, username, hostname, line); in login_alloc_entry()
373 login_init_entry(struct logininfo *li, pid_t pid, const char *username, in login_init_entry() argument
386 if (username) { in login_init_entry()
387 strlcpy(li->username, username, sizeof(li->username)); in login_init_entry()
388 pw = getpwnam(li->username); in login_init_entry()
391 li->username); in login_init_entry()
[all …]
H A Daudit-linux.c42 linux_audit_record_event(int uid, const char *username, const char *hostname, in linux_audit_record_event() argument
55 NULL, "login", username ? username : "(unknown)", in linux_audit_record_event()
56 username == NULL ? uid : -1, hostname, ip, ttyn, success); in linux_audit_record_event()
/freebsd/crypto/heimdal/appl/login/
H A Dutmp_login.c86 const char *username, const char *hostname) in prepare_utmp() argument
93 strncpy(utmp->ut_name, username, sizeof(utmp->ut_name)); in prepare_utmp()
96 strncpy(utmp->ut_user, username, sizeof(utmp->ut_user)); in prepare_utmp()
127 void utmp_login(char *tty, const char *username, const char *hostname) in utmp_login() argument
133 void utmp_login(char *tty, const char *username, const char *hostname) in utmp_login() argument
138 prepare_utmp (&utmp, tty, username, hostname); in utmp_login()
/freebsd/contrib/wpa/src/crypto/
H A Dms_funcs.c82 const u8 *username, size_t username_len, u8 *challenge) in challenge_hash() argument
92 addr[2] = username; in challenge_hash()
172 const u8 *username, size_t username_len, in generate_nt_response() argument
179 if (challenge_hash(peer_challenge, auth_challenge, username, in generate_nt_response()
200 const u8 *username, size_t username_len, in generate_nt_response_pwhash() argument
207 username, username_len, in generate_nt_response_pwhash()
230 const u8 *username, size_t username_len, in generate_authenticator_response_pwhash() argument
263 challenge_hash(peer_challenge, auth_challenge, username, in generate_authenticator_response_pwhash()
286 const u8 *username, size_t username_len, in generate_authenticator_response() argument
294 username, username_len, nt_response, response); in generate_authenticator_response()
H A Dms_funcs.h13 const u8 *username, size_t username_len,
18 const u8 *username, size_t username_len,
24 const u8 *username, size_t username_len,
29 const u8 *username, size_t username_len,
37 const u8 *username, size_t username_len, u8 *challenge);
/freebsd/contrib/unbound/daemon/
H A Dunbound.c481 if(cfg->username && cfg->username[0]) { in perform_setup()
482 if((pwd = getpwnam(cfg->username)) == NULL) in perform_setup()
483 fatal_exit("user '%s' does not exist.", cfg->username); in perform_setup()
557 if(!(cfg->username && cfg->username[0])) in perform_setup()
579 if(cfg->username && cfg->username[0] && cfg_uid != (uid_t)-1) { in perform_setup()
587 cfg->username, strerror(errno)); in perform_setup()
648 if(cfg->username && cfg->username[0] && cfg_uid != (uid_t)-1) { in perform_setup()
650 if(initgroups(cfg->username, cfg_gid) != 0) in perform_setup()
652 cfg->username, strerror(errno)); in perform_setup()
666 cfg->username, strerror(errno)); in perform_setup()
[all …]
/freebsd/lib/libpam/modules/pam_login_access/
H A Dlogin_access.c176 group_match(const char *tok, const char *username) in group_match() argument
183 if ((passwd = getpwnam(username)) == NULL) in group_match()
188 syslog(LOG_ERR, "getgrnam() failed for %s: %s", username, strerror(errno)); in group_match()
190 syslog(LOG_NOTICE, "group not found: %s", username); in group_match()
194 syslog(LOG_ERR, "cannot allocate memory for grouplist: %s", username); in group_match()
198 if (getgrouplist(username, passwd->pw_gid, grouplist, &ngroups) != 0) in group_match()
199 syslog(LOG_ERR, "getgrouplist() failed for %s", username); in group_match()
/freebsd/usr.sbin/cron/lib/
H A Dmisc.c334 allowed(char *username) in allowed() argument
353 isallowed = in_file(username, allow); in allowed()
355 isallowed = !in_file(username, deny); in allowed()
358 isallowed = (strcmp(username, ROOT_USER) == 0); in allowed()
372 log_it(const char *username, int xpid, const char *event, const char *detail) in log_it() argument
390 msg = malloc(strlen(username) in log_it()
412 username, in log_it()
444 syslog(LOG_INFO, "(%s) %s (%s)\n", username, event, detail); in log_it()
451 username, pid, event, detail); in log_it()
/freebsd/contrib/netbsd-tests/usr.sbin/useradd/
H A Dt_useradd.sh30 username="test5678901234567"
41 atf_check -s exit:0 -o ignore -e ignore -x "useradd $username"
45 atf_check -s ignore -o ignore -e ignore -x "userdel $username"

123456789