Server IP : 127.0.0.2 / Your IP : 18.191.171.58 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/augeas/lenses/dist/tests/ |
Upload File : |
module Test_Passwd = let conf = "root:x:0:0:root:/root:/bin/bash libuuid:x:100:101::/var/lib/libuuid:/bin/sh free:x:1000:1000:Free Ekanayaka,,,:/home/free:/bin/bash root:*:0:0:Charlie &:/root:/bin/csh " test Passwd.lns get conf = { "root" { "password" = "x" } { "uid" = "0" } { "gid" = "0" } { "name" = "root" } { "home" = "/root" } { "shell" = "/bin/bash" } } { "libuuid" { "password" = "x" } { "uid" = "100" } { "gid" = "101" } { "name" } { "home" = "/var/lib/libuuid" } { "shell" = "/bin/sh" } } { "free" { "password" = "x" } { "uid" = "1000" } { "gid" = "1000" } { "name" = "Free Ekanayaka,,," } { "home" = "/home/free" } { "shell" = "/bin/bash" } } { "root" { "password" = "*" } { "uid" = "0" } { "gid" = "0" } { "name" = "Charlie &" } { "home" = "/root" } { "shell" = "/bin/csh" } } (* Popular on Solaris *) test Passwd.lns get "+@some-nis-group::::::\n" = { "@nis" = "some-nis-group" } test Passwd.lns get "+\n" = { "@nisdefault" } test Passwd.lns get "+::::::\n" = { "@nisdefault" { "password" = "" } { "uid" = "" } { "gid" = "" } { "name" } { "home" } { "shell" } } test Passwd.lns get "+::::::/sbin/nologin\n" = { "@nisdefault" { "password" = "" } { "uid" = "" } { "gid" = "" } { "name" } { "home" } { "shell" = "/sbin/nologin" } } test Passwd.lns get "+:*:0:0:::\n" = { "@nisdefault" { "password" = "*" } { "uid" = "0" } { "gid" = "0" } { "name" } { "home" } { "shell" } } (* NIS entries with overrides, ticket #339 *) test Passwd.lns get "+@bob:::::/home/bob:/bin/bash\n" = { "@nis" = "bob" { "home" = "/home/bob" } { "shell" = "/bin/bash" } } (* NIS user entries *) test Passwd.lns get "+bob::::::\n" = { "@+nisuser" = "bob" } test Passwd.lns get "+bob::::User Comment:/home/bob:/bin/bash\n" = { "@+nisuser" = "bob" { "name" = "User Comment" } { "home" = "/home/bob" } { "shell" = "/bin/bash" } } test Passwd.lns put "+bob::::::\n" after set "@+nisuser" "alice" = "+alice::::::\n" test Passwd.lns put "+bob::::::\n" after set "@+nisuser/name" "User Comment"; set "@+nisuser/home" "/home/bob"; set "@+nisuser/shell" "/bin/bash" = "+bob::::User Comment:/home/bob:/bin/bash\n" test Passwd.lns get "-bob::::::\n" = { "@-nisuser" = "bob" } test Passwd.lns put "-bob::::::\n" after set "@-nisuser" "alice" = "-alice::::::\n"