Changeset 492
- Timestamp:
- Oct 25, 2010, 4:56:54 PM (15 years ago)
- File:
-
- 1 edited
-
branches/scripts/user/usermod.cmd (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/scripts/user/usermod.cmd
r299 r492 1 1 /* UserMod script for Samba Server for eCS (OS/2) */ 2 Version = '2. 2.1'3 /* Copyright (C) netlabs.org 2007-20092 Version = '2.' 3 /* Copyright (C) netlabs.org 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 62 62 UserExists = _UserIsValid(User) 63 63 select 64 65 66 67 64 68 when mode = "P" & \UserExists then do 65 69 say 'User "'User'" is invalid - cannot set primary GID!' … … 90 94 exit 254 91 95 end 92 when mode = "?" | mode = "H" | arg(1) = "/?" | (User = "" & mode <> "" ) then do96 when mode = "?" | mode = "H" | arg(1) = "/?" | (User = "" & mode <> "") then do 93 97 if (User = "" & mode <> "" & mode <> "?" & mode <> "H") then say "Ambiguos commandline. Check syntax!" 94 98 say … … 97 101 say 'Rename a kLIBC user: usermod -r "oldusername" "newusername"' 98 102 say 'Set user''s primary GID: usermod -p "username" "group"' 103 99 104 say 100 105 say 'usermod without parameters just rewrites kLIBC password database' … … 109 114 when mode = "R" then call _UserRename 110 115 when mode = "P" then call _SetPrimaryGID 116 111 117 otherwise nop 112 118 end … … 378 384 _UserAdd: /* add a user to master.passwd STEMS and group STEMS */ 379 385 /* Minimum UID that a user can obtain */ 380 call beep 880, 50381 386 MinUID = 100 382 387 if translate(User) = "ROOT" then MinUID = 0 … … 403 408 pwchange.I = '0' /* dummy value */ 404 409 deact.I = '0' /* dummy value */ 405 if \MachineAccount then do 410 if \MachineAccount then do 406 411 if uid.I = 0 then do 407 412 if Group512 <> 0 then gid.I = 512; else gid.I = 0 … … 411 416 then gid.I = 513; else gid.I = NextUID /* GID must be UID for guest account */ 412 417 end 413 gecos.I = User /* not really appropriate, but better than a dummy value */414 home.I = '/nonexistent' /* a suitable default for OS/2 should be added here*/415 shell.I = '/usr/sbin/nologin' /* dummy value */416 end 417 else do 418 gecos.I = User /* not really appropriate, but better than a dummy value */ 419 home.I = */ 420 shell.I = '/usr/sbin/nologin' /* dummy value */ 421 end 422 else do 418 423 if Group515 <> 0 then gid.I = 515; else gid.I = NextUID /* Should be group ID (GID) !!! */ 419 424 gecos.I = 'Machine account' … … 499 504 end 500 505 return 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555
Note:
See TracChangeset
for help on using the changeset viewer.
